Questions tagged [flutter-go-router]

Use this tag for questions about the Flutter's go_router package.

266 questions
1
vote
2 answers

Error trying to use go_router with BottomNavigationWidget

I'm doing a go_router practice and I'm trying to use it with BottomNavigationWidget, but I can't get it to work correctly, because I have the following problem: when I try to navigate without debugging, I don't go to any page and it stays on the…
cosmos multi
  • 543
  • 1
  • 6
  • 13
1
vote
1 answer

flutter go_router unnecessary rebuild on push and go back

Here is example of test app: dartpad Inside app we have 2 main routes: ListPage and ListItemViewScreen. ListItemViewScreen is child route from ListPage. In this case, ShellRoute used only for example Problem: when we click on any item in list(row 81…
smie
  • 592
  • 1
  • 9
  • 25
1
vote
1 answer

go_router: deep linking to application from browser is not activating router

My app opens a browser for the user to log in. The back end app then issues a redirect to a deep link. My routes file has this: GoRoute( path: '/login/:token', builder: (context, state) { final token =…
1
vote
1 answer

How to display dialog outside the ShellRoute view using Go router?

I am working on a Flutter web app using go_router. I need to display a dialog outside the ShellRoute view. I have the following code: ShellRoute( builder: (context, state, child) { return HomePage( child:…
Fi3rce
  • 9
  • 3
1
vote
0 answers

How to use GoRouter inside of a widget

I want to have some navigation inside of my dialog. In the past I just used a Navigator widget for that: @override Widget build(BuildContext context) { return Navigator( key: _navigatorKey, initialRoute: routeHome, …
Martin Seubert
  • 978
  • 3
  • 21
  • 37
1
vote
1 answer

Flutter GoRouter: How to detect when a page is inside the page entered

I am using GoRouter and the initial page is loading data on initState. When navigating to another page and going back to the initial page initState isnt called. How can I detect when the the navigator pops to the intitial page / the initial page is…
derChris
  • 726
  • 8
  • 19
1
vote
0 answers

GoRouter - Using ShellRoute properly in Flutter

I am using a ShellRoute within my GoRouter with those arguments: final GoRouter _vamosRouter = GoRouter( debugLogDiagnostics: true, initialLocation: EventsPage.route, errorBuilder: (_, __) => const ErrorPage(), routes: [ …
Jan Hecker
  • 61
  • 1
  • 10
1
vote
1 answer

Refreshing a view after context.pop() with go_router and bloc

I have 2 different views with two different blocs. One page displays data that is edited on the second page. When I upload values from my bloc on the second page and execute a context.pop to return to the first page, the first page doesn’t reaload…
Jane
  • 19
  • 1
1
vote
1 answer

How to see GoRouter navigation stack's top element without poping it?

I am building a flutter app. I have a place in the app where you can make infinite loops with GoRouter.of(context).push(...); I mean you can navigate to Screen A and then to B and then to A. There are many screens and many possible loops but I want…
Kolompos
  • 21
  • 3
1
vote
2 answers

Go_Router, How to get result in previous page

In my project i am setting up go_router navigation and it works great for navigate, but i found two issues in two cases which i am mentioning below. Not found a proper way to pass result in previous page I have created a common function for…
1
vote
3 answers

navigation inside Futurebuilder

I am trying to navigate after login inside futurebuilder. api request done successfully but navigation getting error while testing. Help me How to use futurebuilder properly. child: ElevatedButton( onPressed: () { …
1
vote
0 answers

How can I make lazy registration in Flutter?

I'm trying to make lazy registration in Flutter. I want the user to have access on home page and on some pages even he/she isn't logged in. I tried this tutorial: https://www.kodeco.com/28987851-flutter-navigator-2-0-using-go_router#toc-anchor-009…
X Y
  • 119
  • 9
1
vote
1 answer

How can I update state notifier(riverpod) from Go router state.params

The pagebuilder in GoRoute has the the only place I can grab the state.params, I want to update my StateNotifier when the route changes if it is different. final LibraryRoutes = Provider((ref) { return ShellRoute( navigatorKey:…
1
vote
1 answer

showModalBottomSheet not working properly within nested go router navigation

I am using go_router package for Navigation 2.0, but while running showModalBottomSheetFunction, the view is not showing correctly. Here is the picture: By the way, I am using nested navigation for bottom navigation bar. I was expecting that…
1
vote
0 answers

how to override a riverpod provider while navigating to another page/screen in flutter?

I have a provider which defaults to Throwing UnimplemedtedError.. I wanted to override it and give a value while navigating to another screen because I need the value for the next screen. see below my implementation void main() async { …
john
  • 1,438
  • 8
  • 18