Replies: 1 comment 1 reply
-
You should change the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to convert the provider below to the new generated class, but the new generated provider doesn't include overrideWithValue that would be preferable as it initializes the provider with the value that you wish without triggering notifiers.
old provider:
new way to generate:
The AppOriginProvider stays in a library that I made for my App and its accessed by other services also from the same library, so I can't initialize in my App with eg.
ref.watch(appOriginStateProvider(appOrigin: eAppOrigin,User))
because the services from the library would be accessing this provider throughref.watch(appOriginStateProvider())
giving me another value state.To try to initialize the AppOriginProvider I did what's shown below but I couldn't override the provider's initial value.
How can I override initial value of a generated provider class?
Beta Was this translation helpful? Give feedback.
All reactions