Questions tagged [flutter-go-router]

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

266 questions
0
votes
1 answer

In Flutter go_router, how to stop pushing the same page twice when a user accidentally double-clicks the routing button at once?

I added a ripple effect to the custom build button when the user navigates to a new page. For the display ripple effect inside the button for a while, I delayed the user navigation to the new page by 150 milliseconds as in the code snippet…
0
votes
1 answer

Netlify shows Page Not Found error with Flutter apps using GoRouter

I have created an app using Flutter v3, and I am using GoRouter to handle all the routes. When I run the app on localhost, everything is working fine. But when I try to go to /signIn page after uploading it to Netlify, it shows a "Page Not Found"…
0
votes
1 answer

Flutter read riverpod provider in GoRoute builder

My Flutter project is migrating to go_router and I have trouble understanding how to access riverpod providers in either a GoRoute's build method or redirect method, as I need to access the user's data to control the navigation. I have a top-level…
Wessel
  • 617
  • 4
  • 13
0
votes
0 answers

Why does Auth0 not redirect me to the specified URL in my Flutter app?

I am trying to set up authentication with Auth0 in a Flutter application and I can't get Auth0 to redirect me to my dashboard after authenticating. It returns me to the login page, which makes no sense to me since it's not the default route and…
Bus42
  • 130
  • 6
0
votes
1 answer

how to rewrite a url in go_router?

I'd like to handle urls like /?query=xxx, and redirect to the url /query/ with the query content being passed as extra // Where should this code go ? if (state.queryParams["code"] != null) { context.goNamed('query', extra:…
Adrien Lemaire
  • 1,744
  • 2
  • 20
  • 29
0
votes
1 answer

Flutter Web - Go Router Navigation Change Web URL based on bottom tab selection

I was trying to implement a bottom-tab navigation with 3 tabs in my home screen for my flutter website project. Currently I'm using go_router package for flutter web routing. Following is my code for web app navigation, What I want to achieve is…
Jay Mungara
  • 6,663
  • 2
  • 27
  • 49
0
votes
1 answer

Flutter image assets not loading after redirect with go_router & login

I have a small Flutter app with 2 screens (/login & /home) and I use go_router to navigate and animated_login. The assets are placed on the home screen and they load fine if I directly access the screen, so pubspec.yaml is correctly defined. The…
0
votes
1 answer

Exception has occurred. _AssertionError ('package:go_router/src/configuration.dart': Failed assertion: line 74 pos 16: 'paramNames.contains(key)':

I am coding an app with Flutter. I am using go_router: ^4.2.7 to navigate between pages. It's a learning app. In the section "my_course_materials_page.dart" there is a widget that opens a page passing a String that contains a URL for opening a pdf…
sachax
  • 75
  • 1
  • 8
0
votes
0 answers

GoRoute enter in initialLocation also for different path

Hello i have a problem with go_router. When I do a context.push to a other router declared in Router, it pass from initialLocation. My initial location is "/home" the other route where i am going is "/new-product". Why happen that? onPressed: ()…
-1
votes
0 answers

flutter web riverpod - update provider once when the screen loads

I'm using go_router and riverpod. I get a query param and I want to set it in a StateProvider. I can't do it here: final goRouterProvider = Provider((ref) { return GoRouter( routes: [ GoRoute( path: '/home', …
Rony Tesler
  • 1,207
  • 15
  • 25
-1
votes
1 answer

Issue passing an id using router-go package

I'm trying to route to specific id /product/:id but when i click on my card to navigate it shows an error , but when i do hot reload it works. **Here is the error **> type 'Null' is not a subtype of type 'String' go-router in main.dart final…
1 2 3
17
18