auto_route_library
auto_route_library copied to clipboard
Cross router navigation is not working as expected
I have a flutter app which has a bottom bar and side navigation drawer. From side navigation bar I want to push a route to the currently selected tab. This can be done by adding that drawer route as a child to each tab router but that would be a redundant code. I want it as a standalone route and avoid redundancy of code.
@MaterialAutoRouter( replaceInRouteName: 'Page,Route', routes: <AutoRoute>[ AutoRoute( path: "/", page: HomePage, children: [ AutoRoute( path: 'user', name: 'UserRouter', page: EmptyRouterPage, children: [ AutoRoute( page: YourAccountPage, ), AutoRoute( page: YourAccountPage, ) ]), AutoRoute( path: 'classes', name: 'SomeClassesRouter', page: EmptyRouterPage, children: [ AutoRoute( path: '', page: ClassesPage, ), AutoRoute( path: ':liveClassId', page: ClassDetailPage, ), AutoRoute(path: 'study-packages', page: StudyPackagesPage), ], ), AutoRoute( path: 'practice', name: 'PracticeRouter', page: EmptyRouterPage, children: [ AutoRoute(path: '', page: PracticePage), ], ), AutoRoute( path: 'AskMe', page: EmptyRouterPage, name: 'AskMeRouter', children: [ AutoRoute(path: '', page: AskPage), ], ), ], ), ], ) class $AppRouter {}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
any updates here?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions