Creating "substream"s of a StreamProvider #3707
Unanswered
showier-drastic
asked this question in
Q&A
Replies: 1 comment
-
You can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, I have a simple
StreamProvider
that produces random numbers each second:Now I want to create two
StreamProvider
s to be substreams of even and odd numbers:Now the problem is that, at any given time, one of the providers will be in a loading state. For example, if the last generated number is even, then
oddNumbersProvider
will be loading state.So, could anyone give a hint how can I create two "sub" providers which are never in "loading" state once initial value is populated? Or, to be more general, what's the correct way to "split" one StreamProvider into two or more?
Beta Was this translation helpful? Give feedback.
All reactions