Goal of this article The goal of this article is to get a comprehensive understanding of the flutter declarative routing and the scenarios like login state, app initialization on startup, splash, onboarding, etc... Problems that I'm trying to solve ...

Markdown supported Β· ββ΅ to post
Hi Ishan. Thank you for your article. I have a question, and need some help from you about go_router. I am in situation that's i want to display a different statefulshell.indexedstack for every type of logged user example : normal user , admin, or super admin so there will be a different nav bar with a different branches if you can please help me or lead me to a solution i have done a try to distinct the branches but it's also only see the initial location and ignore the rest of the routes if there is any solution to change the initial location dynamicly gor every type of user.
As I was going through docs for refreshListenable, it appears this is going to be depreciated. Reference: github/flutter/flutter/issues/116651
Hi, thanks for the tutorial. however I couldn't make it work. Cloned your repo and got some errors from the get go. I had to
flutter create .
and
flutter pub upgrade
Besides updating the dependencies in pubspec.yaml
provider: ^6.0.4
go_router: ^5.2.0
shared_preferences: ^2.0.15
Also, I had to change the redirect definition to
redirect: (context, state) {
After all that I could finally run the app but only to find out it never leaves the splashScreen... All it shows it the CircularProgressIndicator forever...
In onAppStart() I commented out the line that waited for two seconds then I ran into an error I couldn't figure it out.
======== Exception caught by foundation library ====================================================
The following assertion was thrown while dispatching notifications for AppService:
setState() or markNeedsBuild() called during build.
I googled the error but failed miserable. Any ideas?
Hi Ishan, thank you for the article. I love the global state handling you implemented for the app, I'll wait for the article using deep links. Could you explain about this same project for handling multiple streams?
Hi Ishanga, thank you for the article. Newbie here :D. Where should I keep the logged in user data? Should I keep it in the AppService provider or in the AuthService? Sorry just trying to learn flutter and figure out what is going on.
Hi Ishan. Thank you for your article. I have a question, and need some help from you about go_router.
First I want to know if the refresh works perfectly on web with your implementation. ? I'm working on a web app, with flutter. When I do a browser refresh I'm redirected to login page, and the login does not work again.
Hi Ishan, Thankyou for the article. It was very useful to me. One question i would like to ask though! You have passed the bloc or provider globally above materialApp here? What about when I need to pass the bloc inside separate routes or sub routes.
Valerii Igumentsev
Renato Dehnhardt
Hey man, nice tutorial, I really like the way that you create the authentication process! And I'm trying to do something like this. I'm got this error when try to execute the project!
unknown route name: /start 'package:go_router/src/configuration.dart': Failed assertion: line 266 pos 12: '_nameToPath.containsKey(name)'and everything it's is like the tutorial! Do you known if the problem are caused by some different version or something like this?