Replies: 1 comment
-
|
Resolved ✅ I initially misunderstood the retry behavior. It turns out that in ProviderScope(
retry: (retryCount, error) => null,
child: MyApp(),
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
✅ Scenario
I have:
SessionStateprovider withkeepAlive: trueDashboardStateprovider withkeepAlive: false(and it throws from
_getData())🧪 Code Example
❌ Actual Behavior
Even though
SessionStateis stable and useskeepAlive: true, theDashboardStatecontinues to rebuild every time the widget re-renders or thesessionStateProvideremits (e.g., if it's refreshed), because thebuild()ofDashboardStatethrows.This leads to:
✅ Expected Behavior
If the session is stable and
DashboardState.build()throws once, the error should be cached and not retried unless:.refresh()is called explicitlySessionStateemits a new value (not same value again)Beta Was this translation helpful? Give feedback.
All reactions