Use this tag for questions about the Flutter's go_router package.
Questions tagged [flutter-go-router]
266 questions
2
votes
0 answers
Reactive redirection using go_router and flutter_bloc with Auth and UnAuth Flow
Implementing navigation based on auth changes using flutter_bloc and go_router.
What i need to do is at start if User is authenticated it should be redirected to HomeScreen with the ability to navigate through the auth…

Taha Aslam
- 21
- 3
2
votes
2 answers
Flutter: How to change page transition based on previous page
I have a Flutter web app with a custom side navigation bar which is displayed on every page. So that I can always show the same side navigation bar while still keeping URL navigation I am using the go_router package with all of the pages in a…

JakesMD
- 1,646
- 2
- 15
- 35
2
votes
0 answers
Using Flutter GoRouter throws "Looking up a deactivated widget's ancestor is unsafe."
I want to use GoRouter to navigate through my app.
I also want my App to be able to navigate on every platform, so I am using push / go depending on the platform.
Now I have specified these routes so far:
class Routes {
static const String home =…

Salatgurke
- 1,554
- 1
- 13
- 35
2
votes
2 answers
Flutter go_router how can i route previous path
I have a page in my app that shows a message saying 'Feature is implementing', and it has a back button to return to the same route the user was on before. I have tried using navigator.pop() and keeping the history, but neither of those solutions…

Deniz Ozak
- 31
- 3
2
votes
0 answers
"BoxConstraints forces an infinite height" when rendered inside GoRouter ShellRoute
I know there are a lot of these errors on the Internet, but this one made me curious. I created a very simple design (MRE) to demonstrate it.
This issue seem to happen when I use the Shell Router from go_router to route child widgets. The design…

Marcelo Barros
- 930
- 9
- 16
2
votes
0 answers
In Flutter Go_Router, the replace command to use routing to ShellRoute is not working properly
I'm trying to make a application that have a init page and nested routed page.
To do that, I use a go_router library.
Here is my code.
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() => runApp(const…

Jun
- 451
- 4
- 16
2
votes
1 answer
Flutter GoRouter won't let me pass int value as queryparam
Flutter GoRouter won't let me pass any value which is not String as parameter.
Error Received
The following _TypeError was thrown while handling a gesture:
type 'int' is not a subtype of type 'Iterable'
Page which receives the int…

Anmol Singh
- 393
- 3
- 16
2
votes
1 answer
How to pass parameter to root path (home route) in go_router?
I'm using go_router_builder to build routes. Here's one:
@TypedGoRoute(
path: '/',
)
class HomeRoute extends GoRouteData {
final Foo? $extra;
HomeRoute([this.$extra]);
@override
Widget build(BuildContext context, GoRouterState…

iDecode
- 22,623
- 19
- 99
- 186
2
votes
1 answer
Flutter go_router parameters within ShellRoute not working
I am using go_router and need have setup a ShellRoute. It is working fine so far. Now one of the routes inside that ShellRoute should have a route with params. And I can not make it work..
This is my setup:
final rootNavigatorKey =…

Chris
- 1,828
- 6
- 40
- 108
2
votes
1 answer
AppBar navigation for nested pages
Normally you would have a Scaffold with its own AppBar on every page, but why is that needed with go_router? Why can't you just have a single Scaffold with an AppBar and let that handle navigation.
Going to the SecondScreen in this example won't…

Keetz
- 63
- 8
2
votes
2 answers
Go_router current route queryParams
Using go_router :
GoRouter.of(context).location
gives us the current route path such as /product/10110 but I'd like to know how to also get the current route queryParams in a similar fashion
(outside of the GoRoute builder)

Aristidios
- 1,921
- 2
- 13
- 24
2
votes
1 answer
How to update riverpod from GoRouter?
In my GoRouter, I retrieve the query params from the URL:
builder: (context, state) {
String q = state.queryParams['q'] ?? '';
int pageNumberInt = int.tryParse(state.queryParams['page'] ?? '1') ?? 1;
// Return component...
}
I would like,…

Stéphane Traumat
- 119
- 8
2
votes
1 answer
Proper way of using a splashscreen with `go_router` package
I display a splash screen when the user open the app and in the meantime the it loads some data. When it finish I want to show a page based on that data. What is the proper way of doing this with the go_router package? The code below is more or less…

Damien
- 921
- 4
- 13
- 31
2
votes
1 answer
Why do transitions between two `GoRoute`s with `pageBuilder` transitions not work in Flutter?
Summary
I want to set up entry and exit transitions in flutter. I'm using the go_router package and navigate via context.go. I have set up a working transition on GoRoute. However, setting up a transition on another GoRoute and navigating between…

Felix ZY
- 674
- 6
- 14
2
votes
1 answer
Go Router not navigating
I try to learn navigation on flutter using Go Router. If i tap the scan button it will move to scan screen. then if i go back it will return to main screen. the problem is when i tap the scan button again, the screen not move to scan screen. Video…

Arik setyawan
- 29
- 1
- 7