499 questions
0
votes
0
answers
90
views
What is the correct way to perform relative navigation in GoRouter?
I’m trying to use relative routing in GoRouter, but I’m running into a confusing issue.
Here is my code:
final GoRouter routerConfig = GoRouter(
initialLocation: '/',
routes: [
GoRoute(path: '...
0
votes
0
answers
68
views
How to influence the animation of the previous route?
I have been trying for quite a while to implement an animation similar to the Cupertino transition. I almost managed to create a parallax effect, but because the Hero animations refuse to work at all, ...
0
votes
0
answers
118
views
Issues facing while using Go Router latest version?
Previously I have used go router for Flutter Web. That time my flutter version was 3.10.6 and the go router version of 6.4.0. In that time The project was configured in such a way so that in URL bar ...
0
votes
0
answers
70
views
GoRouter StatefulShellRoute : initState not called when revisiting tab
I’m using GoRouter with StatefulShellRoute and a custom bottom navigation bar in my Flutter app.
When I navigate between tabs, the initState() of my HomeScreen does not get called again when I return ...
1
vote
0
answers
98
views
Android Manifest file errors after setting API 35 and app stuck on welcome screen
Below is the Manifest.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.refereevision"
xmlns:tools="http://schemas....
0
votes
0
answers
60
views
Manual dispose of the provider in Flutter
In the mobile application I developed with Flutter, I go to different screens from the home page. Then, when I go back to the home page, I need to dispose some providers.
In the project, I am using a ...
0
votes
0
answers
36
views
How to access navigation result in GoRoute onExit
I am using go_router to provide routing navigation in a flutter application.
I have pages which are displayed as modal dialogs - hence they are 'barrier dismissable'.
I want to prevent the user from ...
0
votes
0
answers
31
views
rootNavigatorKey.currentContext sometimes null in didChangeAppLifecycleState on resume
I’m using GoRouter and a global NavigatorKey.
Sometimes, I see crashes in production logs where rootNavigatorKey.currentContext is null inside didChangeAppLifecycleState on both Android and iOS.
I can’...
0
votes
1
answer
84
views
Unable to call provider of parent route
Is there is a way to access the providers of the parent route?
I installed go_router for my app.
I am getting the error below when I am trying to get the instance of ProductsViewmodel to /products/add ...
0
votes
1
answer
68
views
Why is GoRouter complaining I'm using a parameterized route as a default location when I'm not?
GoRouter is complaining that I'm using a parameterized route as the default location, but I'm not.
The default location of a StatefulShellBranch cannot be a parameterized route
'package:go_router/src/...
0
votes
0
answers
57
views
go_router shows blank screen on first launch after fresh install, works fine afterwards error Multiple widgets used the same GlobalKey
I’m facing a strange issue with go_router in my Flutter app.
On a fresh install (right after installing the app), when I open the app for the first time, the screen stays blank and no widgets are ...
0
votes
2
answers
82
views
How to disable mobile_scanner widget on changing page via GoRouter
I'm new to Flutter and Dart.
I'm using GoRouter and StatefulShellRoute (from https://codewithandrea.com/articles/flutter-bottom-navigation-bar-nested-routes-gorouter/) for a nested navigation using a ...
0
votes
1
answer
85
views
Flutter GoRouter.go does not work after Navigator.push
To reproduce:
Do Navigator.of(context).push(MaterialRoute(builder: (_) => SomePage);
Do GoRouter.of(context).go('/anywhere')
Expected result:
You see the page at /anywhere.
Actual result:
You ...
0
votes
0
answers
51
views
Deeplink Web Flutter issue
I have implemented deepLink on flutter with go_router package.
Everything works fine on mobile app but when I try to open a link on the web using for example a QR code this does not work and I get ...
2
votes
1
answer
115
views
Listen to tab change Stateful Shell Route with Persistent_bottom_nav_bar_v2
I have a timer running on my main page, and I want to pause it when I navigate to another tab on my bottom nav bar and make it continue when navigating back. I use Go_Router Stateful Shell Navigation ...
0
votes
1
answer
175
views
Go_Router Codec Extra parameters don't modify data when popped
How do I edit the values passed as extra parameters in the go_router via codec?
Can I modify this object and pass the modifications back with go_router other than as a popped object?
edit: found this ...
2
votes
1
answer
173
views
GoRouter triggering rebuild when navigating away
I've noticed that when I include final String _ = GoRouterState.of(context) in my Widget.build override, it will get notified of a change when navigating to a different page, forcing a unexpected ...
0
votes
0
answers
136
views
Flutter go_router: Back button not working correctly when navigating from outside ShellRoute to nested route inside ShellRoute
I'm using the go_router package in my Flutter app with a ShellRoute setup that holds a bottom navigation bar. The app routes look like this simplified version:
final GlobalKey<NavigatorState> ...
0
votes
0
answers
49
views
Flutter/Go_router - ErrorBuilder on StatefulShellBranch
When using stateful navigation with go_router is there a way to have a centralized errorBuilder in case a unknow route gets called?
I have tryed to use the error builder in the main GoRouter instance ...
0
votes
1
answer
106
views
How to navigate multiple nested pages with deeplink
On handling notification about new message in chat and when app is terminated i need to build multiple screens with "Chat" page on top of the stack.
For that I need to build "Home" ...
1
vote
1
answer
211
views
How to navigate to first/default route of GoRouter StatefulShellBranch
I'm using a StatefulShellRoute with StatefulShellBranches as in the code below.
I would like to achieve the following: when I am inside a route in a StatefulShellBranch I want to navigate to the first/...
0
votes
0
answers
28
views
Can't redirect from browser link to a specific page
I'm making a full stack app with flutter and express.js, with go router for navigation, and my backend sends a password reset token to a user, which the user is meant to click and be directed to the &...
0
votes
1
answer
151
views
Access previous route while redirecting // Prevent deeplink on some conditions
Context
I have a login page in my app that can be push from anywhere using pushNamed('auth').
On that page the user request a login email, which will contain a deeplink with his login token: `"/...
1
vote
0
answers
48
views
When and how to use GoRouter in flutter?
I have a mobile app which uses GoRouter as a routing package. For a simple list/detail structure of any entity it is clean. Let's say we have 2 bottom naviation items.
GoRoute(
path: '/locations'
...
4
votes
3
answers
429
views
Flutter Dismissing the Keyboard Automatically When Clicking the TextField
I am new to Flutter and facing a very strange issue:
I have a simple Stateless Widget with a Custom App Bar, then a TextFormField and a button inside the Column. I am using go_router for the ...
0
votes
0
answers
84
views
Firebase Analytics auto track routes only shows FlutterViewController
I want to auto-track routes inside my app for better analytics.
Inside my GetMaterialApp.router:
navigatorObservers: [
FirebaseAnalyticsObserver(
analytics: ...
0
votes
1
answer
54
views
No ScaffoldMessenger widget found inside Builder
main.dart:
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_template/bloc/...
0
votes
1
answer
78
views
Prevent already open route to open again with go_router
I use go_router in combination with flutter navigation api.
Here are my routes:
home-route
objects-route
object-route
From home I would call Navigator.push() to get to objects and the context.push() ...
0
votes
1
answer
30
views
GoRouter won't navigate to a new screen and there is no error message
In my main.dart I have defined my router:
Widget build(BuildContext context) {
final router = ref.read(routerProvider);
Then
return MaterialApp.router(
routerConfig: router,
In my ...
1
vote
0
answers
32
views
Issues with User Authentication using Cognito in Flutter (GoRouter, StreamBuilder, and FutureBuilder)
I am working on a Flutter project where I am trying to implement authentication using Amazon Cognito. I am facing issues with the authentication flow, and the app is stuck in an endless waiting state ...
1
vote
1
answer
44
views
How can I generate an 403 Forbidded error using go_router in flutter without redirecting to forbidden page itself?
I need to implement 403 Forbidden page in web flutter application without redirecting to some /forbidden path but leaving on the page which is forbidden. It it possible?
2
votes
0
answers
111
views
Flutter GoRouter causes screen freeze while Navigator works fine
I'm using GoRouter in my Flutter application to handle routing. However, when I navigate to a specific todo item, the screen freezes, but the log messages print correctly, indicating that the route ...
1
vote
0
answers
127
views
How to add Deep Link to FCM Push Notification Payload for Flutter's GoRouter to understand it?
I have a Flutter app for which I've setup Deep Linking using the GoRouter package, as explained here. Testings of the deep-linking in the terminal via:
adb shell 'am start -a android.intent.action....
0
votes
1
answer
113
views
Flutter, circular / recursive routes with Navigator 2.0 (go_router)
Some applications might require circular (recursive) routing with the full stack state preservation, for instance a user might have posts, post details page might have a reference to the author, and ...
0
votes
1
answer
129
views
I published flutter web on iis server and when reload or refresh link gives 404 error
i am using flutter as a web when publish as a release mode on iis server gives HTTP Error 404.0 - Not Found when reload with url,but ok with click on links.
but localhost work fine, there no any ...
1
vote
1
answer
106
views
Flutter GoRouter Redirection with Riverpod and Amplify Stream
In my project, I'm using GoRouter for navigation, Riverpod for state management and an AWS backend for users and data. I have a StreamProvider set up with DynamoDB data from a user like so:
Stream<...
0
votes
1
answer
92
views
Flutter: How to use GoRoutes correctly with Firebase Auth
I have a Flutter app where I use GoRouter for the routing part, FirebaseAuth for the authentication, Riverpod for the state management and Firebase Realtime for the database.
When a user registers on ...
1
vote
0
answers
204
views
"Bad state: Future already completed" when handling async login with modal navigation
I have two pages in my Flutter app:
Settings Page (which has a login button)
Login Page (where the user enters credentials)
Navigation Flow:
On the Settings Page, clicking the login button opens a ...
1
vote
0
answers
36
views
Provide app-state specific Bottom Navigation Bar with Stateful Nested Routes using GoRouter
I'm looking for a solution which contains exactly what you see described in this article, but with the additional feature of displaying a bottom navigation bar that is specific to the current app ...
0
votes
0
answers
30
views
Is this a valid routes config in go_router?
This is actually a short version of this question (at least these questions are related in meaning).
Is the following routes structure valid? (hint: these are nested ‘routes’ sections)
final _router = ...
0
votes
0
answers
45
views
What is a difference when a child route is a sub-route compared to where this route is on the same level as a root route?
I want to convert the old solution based on Navigator api on go_router, but have problems with the following logic.
old Navigator solution (it works):
Widget buildListItem(BuildContext context, ...
0
votes
1
answer
39
views
get Route's Page notified about own activation/deactivation upon changing current Navigator
I need some of my app's pages to be notified when they are activated or deactivated as a result of change of the current Navigator. When both my target page (PageA) and the overlapping page (PageB) ...
1
vote
1
answer
394
views
Trigger GoRouter's redirect method when riverpod provider state changes
In my application, I will have a riverpod provider that is holding in its state the information about whether the user is logged in or not.
Something like:
@riverpod
class Auth extends _$Auth {
@...
-1
votes
2
answers
70
views
How to return to previous page?
The backbutton interceptor is not working in the code. i also tried with PopScope, but not working yet. I don't want to exit the app ,just redirect to previous page. For this what I need? Like do I ...
0
votes
1
answer
223
views
How to handle "previous/back" button when displaying a dialog with flutter web
When i display a modal dialog in Flutter Web, i would like to make the back button close the current dialog instead of go back to the previous route. After some search, i found PopScope but i can't ...
1
vote
1
answer
55
views
Is there an essential difference how the GoRouter's configuration is created with or without sub-routes for MOBILE flutter app?
Let's say we have GoRouter configurations where first one contains the sub-route and second one no.
GoRouter(
routes: [
GoRoute(
path: '/users',
routes: [
GoRoute(
...
0
votes
0
answers
116
views
Widgets don't rebuild using go_router and async redirect
I've been trying to implement navigation from login page to home page based on authentication status from firebase.
Untill now Ive had this simply done with bloc listener (therefore I know the whole ...
1
vote
0
answers
129
views
Flutter GoRouter: ShellRoute with Subroutes
I am currently developing a flutter application using the go_router package.
At the base there is one Shellroute with 4 routes in total. So this is the main screen containing a "Home", "...
0
votes
1
answer
248
views
I would like to ask you about PopScope and go_router. I'm afraid it should have any issue
I'm trying to catch a PopScope event. I've tried but without success. Here is my code. I'll simplify it a bit:
GoRoute(
path: '/group/:groupId',
builder: (context, state) {
final groupId = ...
1
vote
0
answers
147
views
Flutter go_router with go_router_builder how to get current context?
I am using flutters go_router package with the go_router_builder. I want to access the current context from the redirect, but the redirect only provides the app context.
My app's structure looks like ...