auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Cross router navigation is not working as expected

Open lakshayasachdeva opened this issue 3 years ago • 2 comments

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 {}

lakshayasachdeva avatar Dec 01 '21 06:12 lakshayasachdeva

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

github-actions[bot] avatar Sep 07 '22 08:09 github-actions[bot]

any updates here?

lakshayasachdeva avatar Sep 08 '22 05:09 lakshayasachdeva

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

github-actions[bot] avatar Nov 07 '22 08:11 github-actions[bot]