Use this tag for questions about the Flutter's go_router package.
Questions tagged [flutter-go-router]
266 questions
5
votes
1 answer
NavigationRail with go_router
I'm developing a web/desktop application that has a fairly standard UI layout involving a NavigationRail on the left and a content pane taking up the remainder of the screen.
I've reciently added go_router so I can properly support URLs in web…

Darc
- 745
- 10
- 26
5
votes
0 answers
Navigating through go_router, it's not rebuilding screen every time
I'm navigating through go router in my web app. But I'm having issue while changing the screen is that when I open particular screen for the first time then its building whole screen with InitState() but after going to another screen, I'm clicking…

Rohan Jariwala
- 1,564
- 2
- 7
- 24
5
votes
1 answer
How to apply transition animation to the .go function using the go_router package
I am using the go_router package because I need the deep linking it provides. I applied animation transitions to some routes but they are static, so every time I go to that route, the same animation is going to trigger. I would like to change the…

Windbox
- 3,929
- 3
- 12
- 20
5
votes
1 answer
How to clear go_router navigation history in redirect method
On application start i have a few configuration pages (that can be skipped by user) that user setup once, and finally ends up in dashboard page.
Possible navigation flows (depend on what user already setup, and what skipped in the past):
'/' ->…

Michał Dziwota
- 838
- 7
- 16
5
votes
1 answer
Using Firebase Authentication with Go Router and Riverpod
I've been reading through this latest implementation of Go Router with Riverpod but don't know how to use Firebase Authentication Streams with it, and I don't know if I need to be using…

Tristan King
- 438
- 4
- 17
5
votes
2 answers
How to persist bottom navigation bar and App bar using GoRouter?
I'm trying to achieve a page where bottom navigation and app bar are fixed. But when I pressed a button it will go to another page without recreating the app bar and bottom nav bar. For routing I'm using go_router package.
There is an answer using…

Tipu Sultan
- 1,743
- 11
- 20
4
votes
3 answers
Alternative to popUntil in go router in flutter
I was wonder if there is alternative to Navigator's popUntil() method, or any workaround to achieve the same.
If i were to use Navigator. I would use like so:
void _logout() {
Navigator.popUntil(context, ModalRoute.withName('/login'));
}
How to…

krishnaacharyaa
- 14,953
- 4
- 49
- 88
4
votes
2 answers
Flutter: Nested navigation inside a page using go_router
In my Flutter app, I use go_router to navigate between pages.
Here are the current pages in my app:
accounts_page
add_account_page
import_accounts_page
Now, I would like to implement nested navigation inside add_account_page, so I can add a new…

matteoh
- 2,810
- 2
- 29
- 54
4
votes
1 answer
Flutter go_router: resume navigation after redirect (e.g. login)
I have a route, /authenticated/page, that can only be viewed once the user is logged in.
go_router's official redirection example shows how to do such "login gate", but it redirects to /.
How do I resume navigation after redirect (e.g. login)?…

wiradikusuma
- 1,930
- 4
- 28
- 44
4
votes
1 answer
Flutter Webview with GoRouter (navigation 2.0) - how to handle back button press
According to this blog, if using Navigator 2.0 and/or (in my case) GoRouter you can no longer override the phone's back button using the "WillPopScope" and onWillPop function call. Navigator 2.0 now uses PopRoute to go back.
This causes an issue…

Delmontee
- 1,898
- 2
- 26
- 44
4
votes
1 answer
How do you go back via the browser button on Flutter web with GoRouter navigation?
I'm testing out Flutter Web a little bit and using GoRouter for navigation. Everything works fine when I click on a navigation Item, but when I click back, the web address correctly changes, but the corresponding page doesn't appear. For…

Hunter Books
- 372
- 2
- 11
4
votes
2 answers
RouteObserver for GoRouter to catch go/goNamed transitions
I have been analyzing different navigator observers by 3rd party integrations (e.g., SentryNavigatorObserver, FirebaseAnalyticsObserver) to make identical for tools that don't have it by default. But I noticed that neither of these is really…

Roman Shirokov
- 329
- 4
- 12
4
votes
4 answers
how can i redirect correctly to routes with GoRouter?
how can i redirect correctly to routes ?
My application has to have some route security and I try to do it with GoRouter
but it always executes one more redirection and always returns to home.
There are only 3 secure routes (profile, order,…

shroot91
- 41
- 1
- 4
4
votes
1 answer
Flutter go_router: how to use ShellRoute with an expanded child?
Given the following go_router config:
GoRouter(
initialLocation: "/one",
routes: [
ShellRoute(
builder: (_, __, child) => Scaffold(body: Column(children: [const Text("Header"), child],)),
routes: [
…

András Szepesházi
- 6,483
- 5
- 45
- 59
4
votes
1 answer
GoRouter - Entering the url in the address bar doesn't only create the related page
I'm writing a web flutter application with go_router.
Below is a code sample to illustrate how it is architectured (you can also check out this repo).
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
…

Valentin Vignal
- 6,151
- 2
- 33
- 73