Closed geronimol closed 1 week ago
I am having the same issue!
@geronimol Please make sure you have a proper nested routes setup https://pub.dev/packages/auto_route#nested-navigation Route2 widget must have an AutoRouter Widget to render child routes
@Milad-Akarie I was looking to Inherited Path Parameters section, but didn't know is that is related to nested navigation, thanks!
I was able to navigate to Route3
by adding this new widget:
@RoutePage()
class Page2Wrapper extends StatelessWidget {
const Page2Wrapper({super.key});
@override
Widget build(BuildContext context) {
return const AutoRouter();
}
}
Then changed the routes like so:
AutoRoute(path: '/home', page: HomeRoute.page, initial: true),
AutoRoute(path: '/route1', page: Route1.page),
AutoRoute(
path: '/:id',
page: Route2Wrapper.page,
children: [
AutoRoute(path: 'route2', page: Route2.page),
AutoRoute(path: 'route3', page: Route3.page),
],
),
Hope this helps @jakelaws1
I am using v8.2.0 on Web(Chrome)
I couldn't find a way to navigate to
Route3
Following docs, I added this to
Route3
Tried this from
Route2
pageand this
But didn't work. Not sure if #1827 and #1963 are related