-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
customRouteBuilder's completion result type has broken in the 8.0.3 version #1913
Comments
@SergeShkurko try specifiying the type when returning your custom Route e.g |
I have same issue. |
@Milad-Akarie I'm running into the same problem mainly because I have a custom class that extends the I have different class MyRoute extends CustomRoute {
MyRoute({
required super.page,
...
super.opaque,
}) : super(customRouteBuilder: <T>(BuildContext context,
Widget child,
AutoRoutePage<T> page,
) => MyRoutePage<T>(
builder: (context) => child,
settings: page,
));
} I solved with this workaround that forces me to specify the return type in the navigation tree declaration too: class MyRoute<R> extends CustomRoute {
MyRoute({
required super.page,
...
super.opaque,
}) : super(customRouteBuilder: (BuildContext context,
Widget child,
AutoRoutePage<T> page,
) => MyRoutePage<R>(
builder: (context) => child,
settings: page,
));
} |
We encounter the same issue for 8.0.3.
|
Any plans on fixing this issue? |
Still same issues for me when I upgrade auto_route to Ver. 8, with my both custom bottomSheet route and dialog route. |
Now, return types don't work with customRouteBuilder correctly
Because of the last commit c2953fe. Type annotation removed from the function
Then any reusable
customRouteBuilder
implementation will return Route with a dynamic type. We won't return any route with passed by router type. We need to handle generics inside the function. Like earlierMore earlier versions work pretty
The text was updated successfully, but these errors were encountered: