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
Sometimes ref.read(myProvider) variables is reset (I'm using ChangeNotifierProvider), I wasted a lot of time to see what make it reset, but I have no idea. The only thing I've caught so far is that the global provider is recalled, and that reset all the state of the provider class.
In my app I'm calling ref.read(myProvider).getLastVersion() in the initState of the main class for init version variable (double? version) and all the rest time I'm using ref.read(myProvider).someFunction...ref.watch(myProvider).someVariable..
I have no Idea what make my provider dispose and reset all the provider variables.
I'm using the provider in settingsScreen class and in showModalBottomSheet.
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
-
Sometimes
ref.read(myProvider)
variables is reset (I'm usingChangeNotifierProvider
), I wasted a lot of time to see what make it reset, but I have no idea. The only thing I've caught so far is that the global provider is recalled, and that reset all the state of the provider class.In my app I'm calling
ref.read(myProvider).getLastVersion()
in theinitState
of the main class for init version variable(double? version)
and all the rest time I'm usingref.read(myProvider).someFunction...
ref.watch(myProvider).someVariable..
I have no Idea what make my provider
dispose
and reset all the provider variables.I'm using the provider in
settingsScreen
class and inshowModalBottomSheet
.Beta Was this translation helpful? Give feedback.
All reactions