Use this tag for questions about the Flutter's go_router package.
Questions tagged [flutter-go-router]
266 questions
0
votes
0 answers
How to properly add `Drawer` to `StatefulShellRoute`
How do I properly add a drawer to this example while keeping the tab specific app bar? When I add one to the Scaffold on one of the pages it works, but the Drawer is not the full vertical size of the screen (only top of the nav bar and up).
But when…

wouter_ensink
- 23
- 4
0
votes
1 answer
How to fix GoRouter.of(context).pop() so it will navigate to the previous page?
I am using
GoRouter.of(context).pop(); to navigate from my Settings page to the previous screen and it works fine.
But if I use it on another screen to navigate back it sends me to the main screen.
This is how it looks like in both cases:
…

Elena Epshtein
- 87
- 1
- 8
0
votes
0 answers
go_router causing all screens in the Navigation stack to rebuild on each push-and pop operation
I'm using go_router 10.0.0 and it rebuilds every screen in the navigation stack every time I do push or pop.
All screens are StatlessWidget and declare it as const constructors as I'm saving the state of each screen using State Management (using…

Anas-Qasem
- 185
- 10
0
votes
1 answer
GoogleBottomNavİgationBar with go_router Packages in Flutter
I want to use GoogleBottomNavigationBar with go_router package for the first time in my Flutter project. But I have a problem. How should I use the package with correct and best practices?
I got the below error, While I was changing a tab on…

TheSylar
- 48
- 7
0
votes
0 answers
What is the correct way to implement routing with go_router in flutter?
This is the structure of some of my go_router routes,
ShellRoute(routes: [
Settingspage ( routes: [ settings page sub routes ] ),
Homepage ( routes: [ userprofilepage -> (== GoRoute != shellRoute)] ),
],
)
settingspage and homepage are sub…

samadfullstack
- 11
- 1
- 3
0
votes
1 answer
Flutter go_router redirect with object parameter
Normally I can go() to a route, and specify extra to pass an object: void go(String location, {Object? extra}). How can I pass the extra parameter from the GoRoute's redirect?
GoRoute(
path: '/',
redirect: (context, state)…

jeffrey.d.m
- 616
- 8
- 23
0
votes
0 answers
How I can navigate to the same screen(detail) from differents screens(list, favorites)?
I'm new in flutter and I trying to build a navigation graph using the package go_router.
I have three screen, list, detail, favorites. You can navigate to detail screen from list screen and favorite screen.
If I build the graph this way, I'm…

user2855001
- 13
- 6
0
votes
0 answers
flutter go_router navigation is not working with no errors
I have implemented go_router in my flutter app and trying to navigate to a screen using this implementation
() {
context.goNamed(
RouteNameConstants.profilecontent,
pathParameters: {"clicked": "about"},
);
even…

abhi jain
- 41
- 1
- 5
0
votes
2 answers
How to maintain page state?
I am using Flutter 3 and go_router v10.0.0 to develop a program.
This program uses the bottomNavigationBar(PageA, PageB, PageC), I hope that after these pages are routed back and forth, the pages can still maintain their state.
For example, pageA is…

AllinProgram
- 188
- 4
0
votes
1 answer
How can I navigate to the root page using GoRouter?
I have looked it up, but how can I navigate to the root using the GoRouter package? Currently, I am using context.pop() corresponding to each current path, like this:
context.pop();
context.pop();
context.pop();
Here is how I have defined the…

sub
- 117
- 1
- 6
0
votes
0 answers
How to open specific page from OneSignal notification in Flutter with go_router?
I'm using the go_router package for routing in Flutter App. And we are using OneSignal for notifications. I'm using this handler when the user tried to open a notification
OneSignal.shared.setNotificationOpenedHandler(
…

Vesko_dev
- 356
- 6
- 18
0
votes
0 answers
How to create a non-routeable container route for go_router(_builder) ShellRoute?
I'm building an app with Flutter.
Consider the following routes in the app:
/section-a/a
/section-a/b
/section-a/c
/section-b/a
/section-b/b
/section-b/c
Each section could also have more children with children having children. Typical nested…

Manuel Rauber
- 1,583
- 1
- 17
- 39
0
votes
0 answers
Flutter Gorouter, clear all the previous screens or upto some screen
I have 5 signup screens, and I want to allow user t go back to each screen until signup completed and navigate to home. When navigating to home, I want to clear all previous screen. So on home, if user is pressing back button, it should exit the…
0
votes
0 answers
refresh StatefulShellRoute in flutter
here is the scenario, Im using StatefulShellRoute to preserve the state of each tab in my app, and when user sign in, or change language of the app, i need to refresh my StatefulShellRoute to load new data.
i tried giving a UniqueKey to each…

Yaser Hesham
- 177
- 1
- 5
- 12
0
votes
0 answers
Android/Flutter/GoRouter "back"-like animation for a `go()` based transition
I am continuing to torture a GoRouter in my Android app project. There are a few "flows" in the app, like onboarding, connecting to a counterpart device etc - effectively, step based processes, where each step is represented by a separate "page" or…

user20532
- 55
- 5