auto_route_library
auto_route_library copied to clipboard
Wildcards explanation is wrong
First, in the README you have the "Wildcards" section, and it is badly formatted. It should be as follows:
AutoRoute(path: '*', page: UnknownRoute.page)
// it could be used with defined prefixes
AutoRoute(path: '/profile/*', page: ProfileRoute.page)
// or it could be used with RedirectRoute
RedirectRoute(path: '*', redirectTo: '/')
Apart from that, I could only make it work by using RedirectRoute
.
If I used an AutoRoute
like this, all pushNamed
methods would go to the wildcard: AutoRoute(path: '*', page: UnknownRoute.page)
.
I did put the wildcard at the end of the route list as instructed by the documentation.