You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can see that due to the presence of a parameter in SecondPage (key is ignored if it's the only parameter), the generated constructor is no longer const, and a SecondRouteArgs class was created.
I'd like to propose in this situation to produce a second constructor:
The purpose here being solely to offer a const constructor, as it can be useful in some situations like when declaring default values or enum constructor arguments.
Because the *RouteArgs classes are already present and public, no changes at all are necessary to what is already being generated, and adding constructors is in no way a breaking change.
The text was updated successfully, but these errors were encountered:
Suppose we had the following routes:
The generated routes would look something like:
We can see that due to the presence of a parameter in
SecondPage
(key
is ignored if it's the only parameter), the generated constructor is no longerconst
, and aSecondRouteArgs
class was created.I'd like to propose in this situation to produce a second constructor:
The purpose here being solely to offer a
const
constructor, as it can be useful in some situations like when declaring default values or enum constructor arguments.Because the
*RouteArgs
classes are already present and public, no changes at all are necessary to what is already being generated, and adding constructors is in no way a breaking change.The text was updated successfully, but these errors were encountered: