Skip to content

Commit 4b808fc

Browse files
Update 3.0_migration.mdx (#4326)
Minor update to avoid misunderstanding in 3.0 migration guide. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Updated 3.0 migration guide to show that per-container retry customization is effectively disabled in the showcased pattern. - Clarified TickerMode behavior: descendant listeners are not paused while TickerMode is active and guidance on when automatic pausing resumes. - Restored and adjusted the ProviderException reference link for improved navigation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent ce5aabe commit 4b808fc

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

website/docs/3.0_migration.mdx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ void main() {
5252
void main() {
5353
final container = ProviderContainer(
5454
// Never retry any provider
55-
retry: (retryCount, error) {
56-
if (error is SomeSpecificError) return null;
57-
if (retryCount > 5) return null;
58-
59-
return Duration(seconds: retryCount * 2);
60-
},
55+
retry: (retryCount, error) => null,
6156
);
6257
}
6358
```
@@ -101,11 +96,11 @@ class MyWidget extends StatelessWidget {
10196
@override
10297
Widget build(BuildContext context) {
10398
return TickerMode(
104-
enabled: false, // This will pause the listeners
99+
enabled: true, // Never pause any descendant listener.
105100
child: Consumer(
106101
builder: (context, ref, child) {
107-
// This "watch" will be paused
108-
// until TickerMode is set to true
102+
// This "watch" will not follow the automatic pausing behavior
103+
// until TickerMode is removed.
109104
final value = ref.watch(myProvider);
110105
return Text(value.toString());
111106
},
@@ -384,4 +379,4 @@ if (value.error is NotFoundException) {
384379
[ProviderBase]: https://pub.dev/documentation/flutter_riverpod/latest/flutter_riverpod/ProviderBase-class.html
385380
[Ref]: https://pub.dev/documentation/flutter_riverpod/latest/flutter_riverpod/Ref-class.html
386381
[Notifier]: https://pub.dev/documentation/flutter_riverpod/latest/flutter_riverpod/Notifier-class.html
387-
[ProviderException]: https://pub.dev/documentation/flutter_riverpod/latest/flutter_riverpod/ProviderException-class.html
382+
[ProviderException]: https://pub.dev/documentation/flutter_riverpod/latest/flutter_riverpod/ProviderException-class.html

0 commit comments

Comments
 (0)