Use this tag for questions about the Flutter's go_router package.
Questions tagged [flutter-go-router]
266 questions
0
votes
1 answer
Passing provider in the Go Router redirect Link and navigation first happen not after that
Error: The following message was thrown: Could not navigate to the initial route. The requested route name was: "/brands" There was no corresponding route in the app, and therefore the initial route specified will be ignored and "/" will be used…

Shahryar Rafique
- 1,211
- 15
- 35
0
votes
1 answer
How to use Go_Router Redirect based of Firebase Auth State
previously I only used firebase authstate (StreamBuilder) by using initialroutes for routes my page
now I want to use go_route to redirect my page if FirebaseAuth not null
how can go_routes be able to detect the state of the authstatechange
this My…

Muzamil Haq
- 3
- 1
0
votes
1 answer
Flutter GoRouter with inner Navigators
The GoRouter package provides examples of nested navigation using ShellRoute. How could this be used to build separate navigator stacks without breaking the linking strategy.
In my app, there is a simple GoRouter navigator that manages a series of…

Walrus
- 19,801
- 35
- 121
- 199
0
votes
0 answers
How to get domain name through go_router on flutter web
Can someone help me find a way of getting full path through go_router? My app support multiple sub domains and I need to know which one was called.
*.domain.com/path
GoRouterState provide me details only for path and nothing for domain or sub…

Galin
- 1
0
votes
1 answer
Flutter go_router with Provider that needs initial paramenters
i'm new to use Provider integrate with go_router in Flutter follow by MVVM pattern. Problem happen when my Provider class needs initial value in constructor.
Let's say we have 2 screens with its view models: Screen1 with ViewModel1 and Screen2 with…

Johnny-Luu
- 1
- 3
0
votes
1 answer
go-router returning 'Null' is not subtype of String
I'm trying to go-router on my routing.
First time it works but once I refresh it works.
final GoRouter _router = GoRouter(
debugLogDiagnostics: true,
initialLocation: '/',
routes: [
GoRoute(
path: '/',
builder: (BuildContext…

Mohammed Malek
- 164
- 1
- 9
0
votes
0 answers
I want when user to click on logo then should redirect to home page but when I click on this it does not load the full page
I Have A fluter web project in which I am using the go router package I have given "/" route to HomePage I also have a logo in my app bar I want when user to click on logo then he or she should redirect to home page for which I have given the logo…

Ashwani Verma
- 3
- 3
0
votes
1 answer
How can I use Gorouter and Pgeview together to achieve the navigation in the Flutter web app with PageView builder and named routes?
I want to achieve Url Navigation in Flutter Web using Gorouter and PageView-builder built within a single scaffold. I want to change the PageView item only and retain the remaining parts of the scaffold without rendering them again.

Salman Ali
- 169
- 1
- 4
0
votes
1 answer
Flutter GoRouter Dynamically Change PageTransition Type with NavigatorObserver
I would like to dynamically change the transition used to navigate between pages.
To do so I created an enum that gives two different transition names TransitionType.fade and TransitionType.slide for example.
I then created an StatefulWidget…

Walrus
- 19,801
- 35
- 121
- 199
0
votes
0 answers
Do I need to declare all pages in Flutter 'go_router'?
I am exploring moving our app to the 'go_router' Flutter package to make use of their Navigator 2.0 functionality.
When initialising the GoRouter with routes, is it standard practice/expected to declare ALL linked/url views here?
For example, I…

Josh Kahane
- 16,765
- 45
- 140
- 253
0
votes
0 answers
Navigate to a page and reload the page using go router flutter
I am navigating from home to test screen using flutter gorouter like this.. from a button in modal bottom sheet in homescreen:
context.pushNamed(
Destination.viewSingleTest,
extra: test
);
Now in test screen after completion, I want to go back to…

ibramazin
- 153
- 9
0
votes
0 answers
go_router child route not rendering on external link on the web
I am trying to create a redirect to a specific screen of my app. I is a child route.
GoRoute(
path: '/redirect',
routes: [
GoRoute(
path: 'google',
builder: (context, state) =>…

Mudassir
- 725
- 6
- 28
0
votes
1 answer
Flutter go_router: This expression has type 'void' and can't be used
I'm stuck with this error:
This expression has type 'void' and can't be used.
dynamic result = await context.pushNamed('location'); î
î
This expression has type 'void' and can't be…

Duddy67
- 836
- 2
- 10
- 26
0
votes
0 answers
Is there a way in Flutter to add a NavBar to a route outside of the Shell Routes?
In Flutter using the go_router library I am adding pages A, B and C, which exist in a BottomNavBar navigation.
They are all encapsulated in a ShellRoute with a BottomNavBar and work like a charm.
My question is how can I add this BottomNavBar to a…

Viktor Kolev
- 1
- 3
0
votes
2 answers
how to navigate to a shell route in go router flutter?
I'm using Go Router 6.2.0 with Flutter 3.7.3
Problem: I want to navigate to the shell route when a user is logged in and the login page when no one is logged in.
What developers usually do is redirect the route to another one when user is logged in…

ceptic
- 162
- 1
- 8