499 questions
0
votes
1
answer
256
views
How to configure `go_router` redirect callback to let users use the app without logging in but when logged, redirect if accessing the login page?
Generic Description
I am developing an app in Flutter using go_router package. The auth logic is as follows:
the user is allowed to use the app without logging in
to access some features, the user ...
0
votes
1
answer
50
views
Exceptions Caught by Gesture
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
class BottomNavBar extends StatelessWidget {
const BottomNavBar({super.key});
@override
Widget build(...
0
votes
1
answer
698
views
Tapping device's back button, the app closes completely using go_router package
I am using the go_router package to implement routing between screens.
first I navigate from the A screen to the B screen using GoRouter, then when I try to navigate from B to A with the device's back ...
1
vote
0
answers
134
views
How can I update the index of a navbar in flutter with go_router and riverpod when the user do pop with system back button?
I'm working on an application that uses GoRouter for navigation and Riverpod for state management. My code works fine, but I'm having an issue trying to update the index of the navbar when the user ...
0
votes
3
answers
653
views
How can i pass function/method as an argument in Go_route package in flutter
I am stuck in navigation. I want to pass the function/Method as argument. I tried to find the solution but I did not get anything. I used go_router package for navigation.
I want to pass a function ...
1
vote
0
answers
177
views
use Hero in StatefulShellBranch with StatefulShellRoute.indexedStack via go_router
How to use Hero between pages from different StatefulShellBranch within a StatefulShellRoute.indexedStack?
I'm using go_router.
How to use Hero between pages from different StatefulShellBranch within ...
1
vote
0
answers
107
views
How to use GoRouter.of(context).backButtonDispatcher.forget property in Flutter using GoRouter
I'm attempting to utilize the forgot property in backButtonDispatcher to disable the back button navigation on the web once the screen is popped. However, I have been unable to find a solution to ...
0
votes
0
answers
78
views
How to Implement Dynamic Redirection Logic in GoRouter Package in Flutter?
I'm currently working with the GoRouter package in Flutter for navigation in my app. I need to implement dynamic redirection logic based on certain conditions, but I'm unsure how to achieve this ...
3
votes
0
answers
334
views
Go Router (Flutter) Reloads Current Page When Pushing to Another Page
I'm facing an issue with Go Router in Flutter where the current page gets reloaded when pushing to a new page. Specifically, when I'm on the "/home" page (which is a part of a shell route) ...
0
votes
1
answer
163
views
Parent Widget forces a rebuild on push
I have a search results page (ListView) where the user can navigate to a detailed page through context.pushNamed(...) (from go_router).
class ResultsPage:
Column of:
+ Search Bar
+ Filter ...
1
vote
1
answer
928
views
Issue accessing queryParams with GoRouter in Flutter app after recent update
I'm encountering an issue with accessing queryParams in my Flutter app while using the GoRouter package for routing. It seems that a recent update has caused a change in how queryParams can be ...
1
vote
1
answer
3k
views
Flutter - How do I correctly handle go_router, with redirects and context.pop()
I'm using go_router and trying to handle auth using redirects, so if a user isn't logged in they go to the inviteCode screen. This all works well.
My flow is:
invite screen -> home -> profile
...
0
votes
1
answer
398
views
Updating go_router package to the latest version causes errors in Flutter app
I have a Flutter app that uses the go_router package for navigation. The app was working fine with version 7.1.1 of go_router, but when I updated to the latest version (13.2.1), I started getting ...
2
votes
0
answers
166
views
How to override riverpod providers for a page route that has been generated with GoRouter?
I am trying to override a riverpod provider for a specifig GoRouter route.
This is my current setup and I am still getting UnimplementedError in the AssessPage
The provider I want to override
@...
3
votes
1
answer
436
views
Flutter: Changing the app theme without rebuilding it entirely
I'm using bloc and go_router
On this example, the theme settings page handles when the user changes the theme, adding the ToggleTheme event to the ThemeBloc, but when it changes, the entire app ...
1
vote
1
answer
2k
views
When using the go_router package in Flutter, is it possible to use the "extra" parameter to pass some data and have it worked with deep-linking?
I saw in the old documentation that using the "extra" parameter to pass data to another page was not working with deep-linking.
I cannot see that in the current documentation (look at the &...
5
votes
2
answers
3k
views
GoRouter in Flutter not recognizing root path deep links without a trailing slash
I'm experiencing an issue with deep linking in a Flutter app, particularly when using GoRouter (version 13.2.1) for navigation. My web app is built with Next.js, hosted on Vercel, and uses a custom ...
4
votes
2
answers
4k
views
Flutter Go Router Deep Linking Not Working As Expected
I am trying to add an action extension to my Flutter app. I intend to use action to send an image to my app. Go Router was used for routing in my app, so I have to use Go Router for deep links.
Due to ...
0
votes
0
answers
88
views
How to trigger a pop callback function after the app is restored and the second route is popped?
The issue is I do not have the value yet when the app gets killed. Imagine such a scenario:
User is on route A.
User navigates to route B (route stack is now [A, B])
User moves the app into the ...
0
votes
1
answer
93
views
Keyboard close automatically and go back automatically when TextFormField is tapped in android
Steps to reproduce
Clone this application from github (dculussoftwares/vilvam.v2) and run it on android emulator.
Go to first search icon and try to hit the text editor on emulator.
Then this will ...
0
votes
1
answer
348
views
Flutter - Pushing into a StatefulShellRoute
I want to implement the following navigation:
GoRouter
├─ StatefulShellRoute-1(root of the app)
│ ├─ GoRoute(/tab-1)
│ ├─ GoRoute(/tab-2)
│ ├─ GoRoute(/tab-3)
│ ├─ GoRoute(/tab-4)
│ ├─ GoRoute(/...
3
votes
2
answers
2k
views
Android 14 back Button closes flutter app instead of popping
I've been having a maddening issue with Flutter and GoRouter for a while now, When I press the phone's back button it either minimizes the app or closes it instead of popping to the previous page. It ...
0
votes
1
answer
448
views
How to hide Tabbar created with StatefulShellRoute of go_router in flutter?
I am making a screen where there is a Tabbar for two different screen.
Lets say BarA and BarB.
Now, in the BarA Tab, There is a Details page, where I want to push, do some stuff and back to BarA tab....
0
votes
0
answers
27
views
I have to go back to my first router from nth router in flutter using GoRouter
I have sequence of routing like A->B->C->D, now i am in my fourth router, its a kind of success page after an api call, now when I tap on done button on route D it should bring user back to ...
0
votes
0
answers
61
views
How to implement exit dialog everywhere (e.g after pressing back button in android) in the flutter app, that there is no path in the stack
I'm using go_router, if it helps!
I wanted to try go_router parameter in material.router constructor but I don't know how to do it.
Also I don't want to use onPopScope for each single of pages.
If ...
1
vote
1
answer
152
views
Swipe back on iOS Web result in janky animation
I am using Flutter GoRouter to navigate from the Homespace with path / to a search page with path /search. I transition to the search page via context.go('/search').
From the search page when I swipe ...
2
votes
0
answers
104
views
MaterialApp.router not rebuilding its sub-routes
I have an MaterialApp.router which is wrapped inside BlocBuilder, something like below.
BlocBuilder<MyCubit, MyState>(
builder: (context, state) {
debugPrint('Material app rebuilds :)');
...
0
votes
1
answer
1k
views
Go_router not functioning as expected
I am having an issue with go_router and can't seem to figure it out. I have used go_router successfully on previous Flutter mobile apps, but on my latest app, I am getting a weird issue in the ...
-1
votes
1
answer
158
views
Access context after Navigator.pop();
I'd like to refetch the data when navigating back from Details screen -> List screen
ReorderableListView(
...
children: _localExercises.map((exerciseInTraining) {
return _Exercise(
...
1
vote
4
answers
899
views
On Flutter go_router how to change only content of special container?
I have a page in Flutter which has 3 different elements header, sidebar and main_content. Sidebar contains some text buttons login, customer, manager etc.
When someone clicks on the button on the ...
3
votes
2
answers
304
views
ProviderContainer and GoRouter
I want to read the GoRouter outside of main() and outside of any widget.
GoRouter provider is defined as follows:
final goRouterProvider = Provider<GoRouter>(
(ref) {
return GoRouter(...);
...
0
votes
2
answers
659
views
How to pass a repository object to the next route in flutter using go_router in web?
I have a repository object which I want to use for two blocs (list view bloc and edit dialog bloc). I.e.
class Repo {
addEntity();
getEntity();
fetchEntities();
...
}
class ListViewBloc ... {
...
1
vote
1
answer
374
views
Issue with Flutter Navigation: Back Button Behavior after context.push()
Problem Description:
I'm building a Flutter application where I have a bottom navigation bar with several tabs. In one of these tabs, I'm using context.push('/createPost') to navigate to a new page ...
1
vote
0
answers
650
views
Flutter GoRouter StatefulShellRoute push from other StatefulShellRoute (root and not) or boilerplate
I am making a complete Flutter clone of Instagram and trying to implement the navigation exactly like in Instagram. For this task I chose GoRouter and are facing some challenging moments, making some ...
3
votes
2
answers
3k
views
How to Navigate from Splash Screen to a StatefulShellRoute.indexedStack route of go_router Flutter
I am developing a Mobile App where the App starts from a
SplashScreen and Navigates go HomeScreen which is implemented under StatefulShellRoute.indexedStack that contains BottomNavigationBar and each ...
0
votes
1
answer
367
views
How to get rid of GoRouter initial route builder method always being called inbetween navigations
My app_router.dart looks like this
GoRoute(
path: '/',
name: AppRoute.todoList.name,
redirect: (context, state) async {
var initialRoute = await getInitialRoute();
...
1
vote
0
answers
92
views
GoRouter not driving me to the screen im requesting on android
sorry for asking but goRouter is not working on my project for deeplinking
I have set all
My android manifest:
<meta-data android:name="flutter_deeplinking_enable" android:value="...
6
votes
1
answer
2k
views
How do i reset the states of GoRouter's StatefulShellBranch routes or remove them upon an event
I have implemented bottom bar navigation in my flutter app using go_router and its routes are made as StatefulShellRoute.indexedStack. The current code looks somewhat like this
final _rootNavigatorKey ...
1
vote
0
answers
457
views
Flutter : How to use connectivity_plus with go_router package
I am trying to add network connectivity validation to flutter application , I am using go_router for routing and navigation . I want to push user to other page if he is not connected to internet. I ...
0
votes
1
answer
1k
views
Deep Nested Navigation Flutter
I need help with using either Go Router or Auto Route for deep nested navigation.
I can navigate just fine to say the child route of the tab bar but if I want to go to the edit profile route it will ...
1
vote
4
answers
1k
views
How to cancel routing go_router in redirection?
How to cancel routing?
If user is not premium user, Try to not allow to move to target routing.
For example, like below.
redirect: (BuildContext context, GoRouterState state) {
if (AuthState.of(...
1
vote
0
answers
795
views
In go_router update StatefulShellRoute.indexedStack() user's custom claims after signing in
Been trying out the go_router StatefulShellRoute.indexedStack() together with FirebaseAuth custom claims. Essentially, I want to customize the StatefulShellBranch depending on their custom claim as is ...
1
vote
1
answer
3k
views
Flutter go_router: How to make changes to routes without refreshing the whole app
I just started using go_router package. I am coming from Navigator 1 where you could easily call Navigator.push to get a new screen on the stack. This makes development faster since all I have to do ...
4
votes
2
answers
1k
views
How to explicitly reset current branch state while switching branches with go_router?
I use go_router's StatefulShellRoute.indexedStack to implement a design with bottomNavBar. How can I reset the current branch to its original state AND go to another branch at the same time?
Tab A is ...
4
votes
2
answers
3k
views
Assertion Failure in go_router package: 'package:go_router/src/parser.dart': Failed assertion: line 63 pos 12: 'routeInformation.state != null'
The error is within the go_router package and is related to an assertion failure in the parser.dart file. The specific assertion that failed is at line 63, position 12, and it checks whether ...
0
votes
1
answer
687
views
Navigation in flutter with go router and riverpod
There a App Landing screen which contains the two buttons SignIn and Signup. If I click on SignIn and there is another button take customer to Signup.
AppLanding Screen > Signin Screen > SignUp ...
0
votes
2
answers
549
views
Flutter : how to change automatically from splash screen to next screen?
I'm having an issue with moving from the splash screen to the next screen in my application. When the app first starts, I want to display a splash screen, and after that I try to use pushReplacement ...
1
vote
1
answer
3k
views
GoRouter: How to navigate to a StatefulShellBranch from outside the StatefulShellRoute while preserving its state and navigation stack?
I'm running into an issue using GoRouter where I'm trying to navigate the bottom navbar tabs programmatically if coming from a page that is outside the stateful shell route.
For example if you observe ...
1
vote
1
answer
362
views
GoRouter redirect parameter allows going back to home page
In my Flutter app for Android, at opening, I want to force the user to log-in. I use the GoRouter redirect parameter:
final router = GoRouter(
routes: [
GoRoute(
path: '/',
...
0
votes
1
answer
212
views
setState() or markNeedsBuild() called during build when opened a deep link ( using go_router )
ISSUE/BUG :
My flutter app is throwing setState() or markNeedsBuild() called during build error only when I open the profile Page as a deep link ( I am using go_router: ^13.0.1 ) .
NOTE :
If I ...