Moving from setState to Riverpod in Flutter Part 2

Опубликовано: 29 Сентябрь 2024
на канале: The Flutter Factory
4,553
127

Part 2 of the Riverpod series covers few useful features of the package including:

.family modifier - send extra data to your provider
.autodispose modifier - control what happens to the state when the provider is no longer being used
reference other providers inside of providers
Using the useProvider hook to replace the Consumer widget

00:00 - intro and looking at docs
01:25 - HookWidget and useProvider hook
06:08 - creating a new FutureProvider
07:53 - Passing extra data with the family modifier
11:48 - Referencing one provider from another
13:57 - Choosing how to persist state with autoDispose

💻Follow along here with the initial code: https://github.com/theflutterfactory/...

⚡Connect on Facebook:   / flutterfactory  

⚡Connect on Twitter:   / flutterfactory  

🎷Music: https://www.bensound.com