Handling side effects and navigation #726
Unanswered
realshovanshah
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Wanted to see how everyone else handled Navigation based on state and side effects such as dialogs, toasts, etc. using provider. I know packages such as Bloc & Riverpod make this trivial by providing a listener(BlocListener & context.listen) but trying to achieve this with provider seems to require either using Future.delayed or adding a post frame callback. This seems unorthodox to me and also I'm yet to find this topic actually discussed.
This question has also been popping up every now on then in the repo's issues and on stackoverflow since 2020 and often doesn't resolve to a concrete resolution.
See: #452, #472, #465, #663
Edit: I did find some discussions on this topic on further research, but I still think the topic is worth discussing. Excited to see all the ways everyone's handling this.
https://stackoverflow.com/questions/58685074/how-to-show-errors-from-changenotifier-using-provider-in-flutter
Beta Was this translation helpful? Give feedback.
All reactions