Replies: 1 comment
-
|
If you wanted to write test code, you can manage it somehow with container.listen. Since the Future Provider is calling other providers sequentially, it appears to be normal behavior for it to be disposed before the asynchronous processing completes. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋
I’m running into something with container.read the future of FutureProvider.autoDispose and I’d like to clarify if this is expected behavior or a bug.
Mininal Example
Observed
The usersProvider is disposed right after the first await in usersProvider, rendering its ref being not mounted, so the next ref.watch errors:
Expected (my assumption)
Since I am reading usersProvider.future, I expect it to keepalive until the future(or its build) completes.
Workaround
usersProvider.futureThis works for now.
Beta Was this translation helpful? Give feedback.
All reactions