Flutter Riverpod 2 Tutorial for Beginners | Riverpod Generator

preview_player
Показать описание
In this tutorial, you're going to learn about ProviderScope, different types of Providers- Provider, StateProvider, StateNotifierProvider, ChangeNotifierProvider, FutureProvider, StreamProvider and modifiers like family and autoDispose; reading providers using Consumer, ConsumerWidget and ConsumerStatefulWidget; different types of Ref's - WidgetRef, ProviderRef, Ref and the methods on them like onDispose, onCancel, keepAlive and onResume; logging with ProviderObserver with the 3 override methods; drawbacks/limitations of using Riverpod, solutions to them and finally generating providers automatically with Riverpod Code Generator.

Special Thanks: @aadhiarun2230

Timestamps:
(00:00:00) Introduction
(00:00:16) Why should we use Riverpod?
(00:00:52) Getting Started with Riverpod
(00:01:21) ProviderScope
(00:03:07) Provider
(00:06:55) Reading Providers using ConsumerWidget
(00:09:17) Reading Providers using Consumer
(00:10:46) ConsumerWidget vs Consumer
(00:15:58) StatefulConsumerWidget
(00:18:20) StateProvider
(00:25:25) StateNotifier & StateNotifierProvider
(00:43:41) Select Property
(00:47:47) ChangeNotifier & ChangeNotifierProvider
(00:53:41) FutureProvider
(00:59:23) AsyncValue
(01:07:28) ProviderRef
(01:13:52) StreamProvider
(01:18:50) Modifiers
(01:19:15) .family
(01:26:11) .autoDispose
(01:29:42) Recap of all Providers
(01:31:54) Ref
(01:33:54) Useful Methods on ProviderRef
(01:37:18) ProviderObserver
(01:42:24) Limitations of Riverpod
(01:44:07) Flutter Riverpod Snippets (VS Code Extension)
(01:45:25) Riverpod Generator + Annotation
(01:52:55) Limitations of Riverpod Generator (till now)
(01:54:22) Conclusion

Helpful Resources:

Connect With Me Here:
Рекомендации по теме
Комментарии
Автор

In your StreamProvider example, you're not returning 10 items in a stream, you're returning a single item that is a List of 10 elements. In other words, had you showed the type of the StreamProvider, it would have been StreamProvider<List<int>>. It would have made more sense to show a StreamProvider<int>, and for that you would need to change your yield to a for-in loop, possibly with a delay to see the stream slowly being dribbled out.

RandalLSchwartz
Автор

In Simple words if someone want to become Pro in flutter then i think Rivaan is best Option.
Thank you so much Rivaan .

codewithihsan
Автор

no bla bla... meticulously planned and executed teaching approach. Thank you so much for your valuable time Rivaan

MaheshwaranVelusamy
Автор

Wow, such a clean tutorial and very helpful + straight to the point. I'm 20 mins in with my ADHD and didn't stop because of curiosity and enjoyment. Although I already know many of the concepts of Riverpod.
Good job!!!

DanielTubul
Автор

sir you're the best teacher of riverpod, i've watched many riverpod tutorial and just from you i deeply understand the riverpod is

_DiftaFitrahulQihaj
Автор

Rivann Thank you so much for your videos.... I dont know why but every time you explain it makes perfect sense for me and its really easy to understand. Good Job!

willystain
Автор

i have came across this video for like 100 times. whenever i need a recap about riverpod im here 😅😅 great video❤❤

sachinbasnet
Автор

Best Riverpod tutorial !!!! The thing that makes the difference is the clarity in explanation! Thank you so much Rivaan!

thomasmakrodimos
Автор

one of the best videos on riverpod topic.. I am ready for the next one with practical examples..
-> best folder structures for riverpod when
- building a web crawler
- newsfeed...
- simple real time chat (any open source database but firebase or amplify --> love appwrite and serverpod..)

fabsync
Автор

i've been watching videos of provider for exactly a week, this one is the best, it considers the viewer a complete begginer which is really appretiate.
Thank you!

ZoMbiECoBRA
Автор

Thanks Rivaan, this video is great! There are very few people that can explain flutter topics as simply as you!

aleksanderwieland
Автор

I was searching for riverpod for beginner and you uploaded it 🙌

roninspect
Автор

Thanks rivaan you always make everything easy great tutorial I was confused and didn't know where to start and you showed up you are one of the best teachers for flutter community

thatsepic
Автор

thanks for explaining stateNotifierProvider so well. It took me an hour to practice and learn every detail you explained...

AkhmadKhanifZyen
Автор

Thanks for the excellent tutorial.

In the StreamProvider example (01:13:52), you are returning a constant list. Adding for loop and delay will be more helpful in understanding the change in the stream.

final streamProvider = StreamProvider((ref) async* {
const int max = 20;
List<int> list = [];

for (int i = 0; i < max; i++) {
await Future.delayed(const Duration(seconds: 1));
list = [...list, i];
yield list;
}
});

vishwajeetpatil
Автор

Thanks Vai . badly needed this ❤❤❤❤❤❤ love from Bangladesh 🇧🇩

nullcodeer
Автор

You can make the part file with a snippet from the riverpod snippets... it even picks up the filename properly.

RandalLSchwartz
Автор

most underrated video for Riverpod, cheers mate

nkx
Автор

you are doing amazing things for your age, more power to your elbow 👏👏👏👏👏

elifyucel
Автор

One of the best video to learn riverpod, you have so much clarity in explanation, i love watching your videos superb channel great work🥰

its_suresh_v
join shbcf.ru