Loading topic
autoDispose and family. T6 min readProviderScope, ConsumerWidget, ref.watch), Dart async/await, and how to run commands in a terminal. It also assumes a Flutter project that already run6 min readref.watch in a ConsumerWidget, and have the packages and build_runner from the previous chapter installed. It covers how a plain function becomes a provider, which provider type you get, and what goes wrong most5 min readref.watch, ref.read and ref.listen. It also covers when each is correct and what goes wrong 6 min read@riverpod function provider and run build_runner (covered in the previous chapters). It also assumes you know ConsumerWidget, ref.watch, and async/await in Dart. You will learn how to write providers whose state changes over time, and how to predict6 min read@riverpod. It also shows how to change that decision and which mistakes follow from ge7 min read@riverpod function provider and run build_runner, as covered in the earlier chapters. You should also be comfortable reading an AsyncValue in a ConsumerWidget. Here you will see how an extra function parameter turns one provider declaration into man6 min read@riverpod function with parameters, as covered in the previous chapter on families. It also assumes you know ConsumerWidget and ref.watch, and you know how Dart's == and hashCode work. The goal is to understand how Riverpod decides that two family calls6 min read@riverpod functions and read them with ref.watch in a ConsumerWidget. It also assumes you know what a family is. You will learn how ProviderScope overrides replace the way a provider is built, which override method fits each provider type, and how overrides6 min read@riverpod functions and families, you know what a ProviderScope override does, and you can write a basic flutter_test or test case. Here you will use that knowledge to test provider code without touching the network or a database.5 min read@riverpod functions, use ref.watch in a ConsumerWidget, and have seen ProviderScope(overrides: ...) replace a dependency at the root of an app. Here you will use the same mechanism lower in the widget tree, so that each subtree gets its own value of a provi6 min read@riverpod functions and classes, add parameters to make families, and use ProviderScope overrides as covered earlier in this tutorial. It collects the three mistakes that cause most confusing behavior with generated providers, and shows how to recognize and fix7 min read