Use this tag for questions about the Flutter's go_router package.
Questions tagged [flutter-go-router]
266 questions
1
vote
1 answer
How to properly use refreshListenable and redirect property in GoRouter
In my Flutter project, I'm trying to check at every request if the response from the back-end returns an invalid token to then logout the user and redirect them to the login page again.
To check if the token is invalid I am using a provider to…

FrancisMB
- 11
- 2
1
vote
0 answers
SOLVED - Using AdaptiveScaffold from flutter_adaptive_scaffold with go_router to show a List -> Details view
Edit: I solved it. Check the source here: https://github.com/hanskokx/flutter_adaptive_scaffold_example
AdaptiveScaffold is great, but I'm having a hard time figuring out how to build layouts properly, due to the lack of documentation.
This is what…

Hans Kokx
- 347
- 3
- 9
1
vote
1 answer
Using go_router package in a flutter app with a statefulShellRoute, how to navigate to routes outside of the shell?
I have implemented go_router statefulShellRoute for bottomNavigationBar to have nested routes in a flutter app.
But I also have pages I want to be outside of the statefulShellRoute (outside bottom nav bar), i have these routes defined in GoRouter…

Jabi
- 101
- 6
1
vote
1 answer
Exception: no routes for location: /level1 in Flutter app
I am trying to build navigation between screens and it doesn't work between two specific screens.
My code on clicked button that should lead to the second screen:
child: FilledButton(
onPressed: () =>…

Elena Epshtein
- 87
- 1
- 8
1
vote
1 answer
How to move another bottom nav bar item by the button which is not in bottom nav bar item
I want to move another bottom nav bar item by the button which is not in bottom nav bar item in go_router
In this image, when I press "Move to B Detail Page" button with bottom nav bar at "Section A", it move B Detail Page with bottom nav bar at…

sukekyo000
- 35
- 3
1
vote
0 answers
How can I have a slash-separated varidic path parameter with go_router?
In my application, I have plugins. Each plugin has a user interface, which can be accessed through a go_router route with a UUID path parameter (/plugin/:uuid).
For example, this is one such path:
/plugin/d2673356-2904-42ff-a196-3388779c386b.
Some…

hacker1024
- 3,186
- 1
- 11
- 31
1
vote
1 answer
flutter go_router: how to manually match active path / route?
Is there a way to manually check with go_router (latest version 7.1.1) if a certain path (aka "route") is currently active?
Example: There are 2 paths:
"/projects/:id"
"/projects/:id/details"
Now I want to check manually if the currently active…

stoniemahonie
- 321
- 1
- 5
- 13
1
vote
1 answer
go_router - how to push a page over existing pages in stack (in any path)
I use go_router for navigation handling in my project. I have an invoice page, and I want to show this page after payment is done over existing pages on navigation stack.
For example, if the user is in /detail/book, /profile/job, or whatever path, I…

vrMan
- 101
- 1
- 1
- 6
1
vote
2 answers
How can i make a list of routes available depending on auth state using go_router and riverpod?
How can i make routes available depending on auth state in flutter app using go_router.
I have logged_in, logged_out and need_verification auth states in my flutter app and i have a few routes that i want to be accessible to a user depending on…

Reazy_ai
- 26
- 3
1
vote
1 answer
error: If the routerConfig is provided, all the other router delegates must not be provided (GoRouting Package)
I want to create an authentication flow with GoRoute and Riverpod.
the as the following:
display a splash screen.
while the splash screen is displayed check if the user has a token or not.
based on the result either navigate the user to the login…

DarkSide77
- 719
- 1
- 4
- 21
1
vote
1 answer
Displaying navigation to the right of the drawer/sidebar
I am making a website (pet project) for myself and I want navigation to take place in a certain area, and not on the entire page. I understand how to do this with React, but not on Flutter, since I have never done web development with it. For…

steind.VY
- 333
- 2
- 11
1
vote
0 answers
Go_Router triggers redirect everytime i use push and go (internal routing) and I only want to trigger redirect on authStateChanges
I am building the authentication setup and I want to redirect users upon authStateChanges. To do that I use the redirect property of the Go_Router package which works just fine. However, navigating routes with push and go also trigger the redirect…
1
vote
1 answer
Flutter go_router with bloc authentication redirection not working
I have an application where the user needs to authenticate in order to have access. I am using the bloc library for state managing the state. My AuthenticationBloc holds a status streamed through the authentication repository. So if any event…

Chinaedu Onwukwe
- 437
- 1
- 7
- 20
1
vote
1 answer
GoRouter always opens root route on tapping app link
I have implemented app links in Flutter by following this doc. I have tested my app on Android and tapping on the app link always leads me to the root route, which is my app's home page.
I tested the same link on the web and the navigation worked…

ASAD HAMEED
- 2,296
- 1
- 20
- 36
1
vote
1 answer
How to hide bottom navigation when we navigate to a child route on `ShellRoute`?
I am trying to create the following navigation:
|_ShellRoute
|_GoRoute /a (needs bottomNav)
|_GoRoute /a/nested/:id (does not need bottomNav)
|_GoRoute /b (needs bottomNav)
|_GoRoute /c (needs bottomNav)
However when I navigate to…

Exprove
- 1,301
- 2
- 18
- 32