ref.exists()
returns true
when manually invalidate a provider.
#3558
Labels
ref.exists()
returns true
when manually invalidate a provider.
#3558
Describe the bug
It appears that
ref.exist(someProvider)
still returnstrue
when manually invalidate a provider, and when try to use the invalidated provideronResume
gets called. While when we setkeepAlive
totrue
or useAutoDisposeNotifier
everything works as expected.This behavior is found when using / not using generated code.
Original issue #2729
To Reproduce
Code Generation Sample
No Code Generation Sample with explanation
To Reproduce
Logs
When we switch to using
AutoDisposeNotifier
the internal state is resets (which means the old provider instance are removed from the container) andref.exists()
returnfalse
. which will produce the following logs:**Logs When Using
AutoDisposeNotifier
**The text was updated successfully, but these errors were encountered: