Commit dbbec5f
Fix setState() called after dispose() in UncontrolledProviderScope
Adds a mounted check before calling setState() in the frame callback
scheduled by UncontrolledProviderScope.build(). This prevents the error
when ProviderScope instances are used in scrollable lists and get
disposed while frame callbacks are still pending.
Fixes #4661
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent e35c43c commit dbbec5f
File tree
2 files changed
+7
-1
lines changed- packages/flutter_riverpod
- lib/src/core
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| |||
0 commit comments