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'm trying to use sub scope overrides to solve my problem. But there is Provider(..., dependencies:[]) which make me confused. The documents don't talk about it very clearly.
here is what I have in mind now:
If I watch providerA in providerB, the riverpod will locate providerA in the root ProviderScope directly.
If I use a sub ProviderScope and override providerA, I have to add providerA as a dependence of providerB. So when I watch providerA in providerB, riverpod will locate providerA in the sub ProviderScope instead of the root one.
Am I right? If I am wrong, please help me figure it out.
Thanks you.
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use sub scope overrides to solve my problem. But there is
Provider(..., dependencies:[])which make me confused. The documents don't talk about it very clearly.here is what I have in mind now:
providerAinproviderB, the riverpod will locateproviderAin the root ProviderScope directly.providerA, I have to addproviderAas a dependence ofproviderB. So when I watchproviderAinproviderB, riverpod will locateproviderAin the sub ProviderScope instead of the root one.Am I right? If I am wrong, please help me figure it out.
Thanks you.
Beta Was this translation helpful? Give feedback.
All reactions