Questions tagged [gorouter]

Questions around go router component functionality in Cloud foundry.

The Gorouter routes traffic coming into Cloud Foundry to the appropriate cloud foundry component, whether it is an operator addressing the Cloud foundry Cloud Controller or an application user accessing an app running on a Diego Cell. The router is implemented in Go language.

88 questions
24
votes
10 answers

Flutter go_router how to return result to previous page?

I'm trying to open a page and get returned result with go_router package. In Navigation 1.0 I use this: final result = await Navigator.push( context, MaterialPageRoute(builder: (context) => const SecondRoute()), ); // handle result But I can't…
dante
  • 984
  • 3
  • 10
  • 24
8
votes
2 answers

How to pop context with FLUTTER go_router?

How do I go back to the previous screen with flutter's go_router? How to pop context? Currently I am simply adding a new screen to the stack whether I want to go back or go forward. onTap: (() => context.go("/secondPage")) I have used …
Srasti Verma
  • 109
  • 1
  • 8
8
votes
1 answer

How to display alert dialog box on back button of browser or onReload the page using Go Router in flutter web?

I am working on the Flutter web and using go_router for navigation. Expectation: From the initial route, When the user tries to navigate back using the browser back button or reload the page, an alert box should be displayed and ask, "Are You sure…
8
votes
4 answers

how can I route using GoRouter in Flutter without context?

The problem I want to solve: My app which uses GoRouter needs to be able to route to a named route from within main(). Since most routing is of the form 'context.go' I cannot do so within main. Background My app uses GoRouter. The ease with which…
satchel
  • 405
  • 5
  • 16
8
votes
5 answers

Set default transition for go_router in Flutter

as the docs from go_router describe, it is easy to set pageBuilder-Transitions for single pages. However, I want to set the default PageTransition for all pages. How do I set the default page transition with/for go_router in Flutter? Single Page: …
Marwin Lebensky
  • 270
  • 1
  • 2
  • 16
8
votes
2 answers

How to convert a Stream to a Listenable in Flutter?

I am trying to figure out how to make use of Firebase's onAuthStateChanges() stream to use as a Listenable in the refreshListenable parameter from the go_router package to redirect whenever the authState changes. In additon I am using…
Florian Leeser
  • 590
  • 1
  • 6
  • 20
7
votes
2 answers

How to define a GoRouter that depends on a Provider?

I'm integrating GoRouter in my Flutter app where I'm already using Riverpod. I have an isAuthorizedProvider defined as follows: final isAuthorizedProvider = Provider((ref) { final authStateChanged = ref.watch(_authStateChangedProvider); …
Marco
  • 1,572
  • 1
  • 10
  • 21
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
5
votes
1 answer

How to use Flutter Firebase dynamic links with go_router

I had firebase dynamic links integrated and working fine in my app and later i changed to use go_router and now i don't know what i should do to get it working or how to handle it. The way i imagined it would be is that the FB dynamic link path will…
Fadel
  • 195
  • 1
  • 9
5
votes
1 answer

Flutter firebase authentication event handler and hot reloads

Following this blog post: https://blog.ishangavidusha.com/flutter-authentication-flow-with-go-router-and-provider I have implemented a flutter app using the go router. I have added the firebase authentication handler in the initState() of my flutter…
ESD
  • 675
  • 2
  • 12
  • 35
4
votes
3 answers

Flutter: how to listen to GoRouter's route / location changes in a Riverpod provider?

I am developing a Flutter application with go_router and riverpod for navigation and state management respectively. The app has a widget which displays a live camera feed, and I'd like to "switch it off" and free the camera when other pages are…
Michele
  • 2,148
  • 1
  • 9
  • 14
4
votes
1 answer

How to use riverpod to force a new build of widget

I'm working on a Flutter app using Riverpod for the state management and go_router for the routing. I'm trying to make a view model for my screen, because my screen need 3 differents async state (a user, a board game, and another request to the…
Collembole
  • 158
  • 2
  • 13
4
votes
2 answers

GoRouter: Refresh on page looses Back Button

I have a home screen and a detail page. When I navigate to the detail page, Flutter automatically adds a back button in the AppBar that when clicked, goes back to the previous page. Now using GoRouter, the UrlPathStrategy.path allows that my detail…
Jonas
  • 7,089
  • 15
  • 49
  • 110
4
votes
1 answer

callback function for navigation in Flutter

In Navigator, we can use .then. for eg: Navigator.push( context, MaterialPageRoute( builder: (context) => XyzScreen(), ), ).then((value) => _someFuncion()); so is there any way to implement the same in…
ravipatel0508
  • 358
  • 2
  • 14
4
votes
2 answers

(EXCEPTION CAUGHT BY GOROUTER) Failed assertion: line 299 pos 13: '!redirects.contains(redir)': redirect loop detected:

I am trying to use GoRoute, Stream, and Bloc. So, I am implementing Auth Process. So, if the user is not log-in they can't access any page. And, `Stream allows to constantly listen to AuthStatus (Bloc State). But, so how I am not sure, why but I am…
Harshit
  • 95
  • 2
  • 8
1
2 3 4 5 6