You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a futureProvider family. One of the things it does when invoked is invalidate another provider, like this... ref.invalidate(stateFilteringBottomSheet)
But what I've noticed is that when invalidate is called the constructor gets invoked for stateFilteringBottomSheetstateNotifier
the comments for invalidate say If used on a provider which is not initialized, this method will have no effect.
stateFilteringBottomSheet has never been initialized at this point and still its constructor is invoked.
As much as I like Riverpod, 3 years on and it still gives me gotchas.
All I want is to make sure that said provider stateFilteringBottomSheet is reset / cleared down to exactly the state it was in at run time.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a futureProvider family. One of the things it does when invoked is invalidate another provider, like this...
ref.invalidate(stateFilteringBottomSheet)
But what I've noticed is that when invalidate is called the constructor gets invoked for
stateFilteringBottomSheet
stateNotifier
the comments for invalidate say
If used on a provider which is not initialized, this method will have no effect.
stateFilteringBottomSheet
has never been initialized at this point and still its constructor is invoked.As much as I like Riverpod, 3 years on and it still gives me gotchas.
All I want is to make sure that said provider
stateFilteringBottomSheet
is reset / cleared down to exactly the state it was in at run time.Beta Was this translation helpful? Give feedback.
All reactions