Closed nyck33 closed 3 years ago
Hey, @nyck33. Sorry you're having trouble. I don't think that this issue has anything to do with flutter_login or riverpod or most of the rest of app-specific code you've pasted into this issue. I'm going to ask that you rip out all of the code that isn't relevant and instead post a minimal repro case so that I can help you debug it.
@csells will do, thanks for chipping in.
I did some refactoring and the problem is gone. Basically the key was to change the state being watched by the ChangeNotifier as early as possible where as I was doing it as late as possible before.
In case a help to someone, here is an example of how to handle login state in river_pod's StateNotifierProvider for routing with go_router. Also, a migration from beamer to go_router.
@chunghha is it deeply-linked and also works in a browser (Flutter-web)? I am looking for deeply-linked tabs and both go_router and routemaster have problems out-of-box.
I did some refactoring and the problem is gone.
Glad to hear it!
I am using go_router with flutter_login: https://pub.dev/packages/flutter_login and Riverpod. I received some excellent advice on how to make Riverpod work with go_router here: https://github.com/rrousselGit/river_pod/issues/884 Everything seems to be working fine except I see in the console: Edit: To be updated with minimal reproducible example.