AsyncNotifier: how to watch only for a property change, ignore the loading/error states #3971
Unanswered
nicolasbraun
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
-
Hello
I have a StreamProvider that is a Stream of a Firebase snapshot of a document Event.
This stream is watched on the Event screen where I need to handle loading/error states wich
AsyncValue.when
which is fine.I also need to reed this Stream in one other controller (for the event Chat) because I need the events settings here
Problem is when the event is edited it transitions for a bit between AsyncLoading and AsyncData causing my ChatController to rebuild.
TL;DR how can I in a select for an AsyncProvider ignore loading/error states (and maybe return the previous value)
I was thinking maybe I can store the previous value and do something like
Thank you
Beta Was this translation helpful? Give feedback.
All reactions