Flutter State Management with Riverpod: The Essential Guide

preview_player
Показать описание
A complete guide to the Riverpod package for Flutter state management. Included: core concepts & how to use all the available providers.

Written tutorial here: 👇👇

Flutter Movie App with Provider, Riverpod & flutter_bloc: 👇👇

CONTENTS:

00:00 - Intro
00:58 - Why Riverpod
02:37 - Riverpod Installation
03:29 - ProviderScope
03:49 - Creating the first Provider
05:31 - StateProvider
06:54 - ProviderListener
07:52 - StateNotifier
09:18 - StateNotifierProvider
10:54 - ChangeNotifierProvider
11:31 - FutureProvider & StreamProvider
13:00 - AsyncValue
13:47 - autoDispose
14:57 - family
17:21 - Dependency overrides
18:39 - Combining Providers
20:04 - ScopedProvider
22:00 - When to use watch vs read
23:29 - Testing
24:28 - Mock and override dependencies in tests
25:50 - ProviderObserver
27:42 - Wrap Up

Want more? Check out all my Flutter courses: 👇👇

Happy coding!
Рекомендации по теме
Комментарии
Автор

By far the best riverpod tutorial Andrea you're the best!

andenetalexander
Автор

A Very complete run-through of Riverpod. Excellent tutorial, my new go to reference for looking up any Riverpod use case scenario. Outstanding job Andrea! 💙

To others watching, ChangeNotifierProvider is skipped a bit, and indeed do prefer and use StateNotifierProvider instead. However, ChangeNotifierProvider is great if you are converting a Provider app to Riverpod and have used it there. You can then start with it, your model classes then remains unchanged and later you can convert them to StateNotifierProvider, if you find it beneficial.

rydmike
Автор

This is great! Thank you so much for explaining WHY riverpod was made (i.e. showing a real example of the drawbacks with a diagram) It helps a lot in design decision-making!

whitemagehealing
Автор

Amazing job with this video, a great summary of riverpod, I've been using it for a while now and this is a great refresher on the more advanced stuff

tameflame
Автор

I hope you do a getx tutorial like this, many of us waiting for that :)

necipakgz
Автор

Very well done, the written tutorials really bring it all together. Thanks and all the best

hectorprx
Автор

That is a very useful guide for researching Riverpod after BLoC.

furkanvatandas
Автор

Thanks for sharing your wonderful knowledge. It's really worth appreciating 👏

realmex
Автор

Thank you so much Andrea. Was eagerly waiting for this tutorial. As always, in-depth, and very production ready. :)

vickybhavnagri
Автор

Really like this format of tutorials!
Thank you!

socketam
Автор

Great .... That was very well explanation in very shot time... 👍👍👍

abdulwahabkhan
Автор

Very good! Esp. the hints when to use something are great. It really fills the gaps :)

bjoerndotsol
Автор

Awesome tutorial👌👌

If possible please make a tutorial of some widgets like switch, snackbar, popup menu, textfield, alert dialog slider as to manage the state management through flutter_riverpod.

#thankyou #flutter #happycoding

ezone
Автор

At 17:16, should note that the custom data class needs a deep-equals, not an object-identity equals. Same with the Map... needs to be immutable.

RandalLSchwartz
Автор

Can we get an essential guide for GetX ?

MrRiyality
Автор

Plz do more totrial with Riverpod firebase stateNotifier thanks

delmanali
Автор

I have a question about riverpod. I am in home screen and I click button jump to login screen after login success then I back to home screen and get unread message count how can I do. Thanks!

zhangkevin
Автор

this format of videos is not beginners friendly.
it assumes that the viewer is already familiar with the subject and he is only looking for the new changes

AliMuhammadAli
Автор

Great in depth tutorial as always! Thank you!

Btw, while following your video i encounter some error on LATE keyword. its says :
'unexpected text late, try removing the text.'
but when I remove the LATE keyword, it shows a lot of errors.
I just copied the code in your written tutorial.

waelhi
Автор

Hi Andrea good to have you back.
I have a stupid question 😅
If I use ScopedProvider redundancy for every widget I have (by map or object) to make all my widgets constant would this be good or bad.

mada