Riverpod 2.0 - Complete Guide (Flutter Tutorial)

  Рет қаралды 109,621

Reso Coder

Reso Coder

Күн бұрын

📗 Learn from the written tutorial 👇👇
resocoder.com/...
🚨 🧑‍💻 Become a top-tier developer with the Flutter Developer Bootcamp:
resocoder.com/fdb
📧 Get Flutter news and resources:
👉 flutter.education
If you’ve been at least a bit active when it comes to Flutter packages in the last year or so, you’ve surely heard about Riverpod, a reactive caching and data-binding, or as some would say, state management package that is sort of an upgrade of the beloved Provider. I actually covered it with a tutorial quite some time ago when its API was still unstable.
Riverpod has come a long way since then - it’s much more mature, helpful, and versatile. All these changes naturally mean that it’s time for a new tutorial to prepare you to fully utilize the power of Riverpod 2.0 and, most likely, also its upcoming versions.
Go to my website for more information, code examples, and articles:
● resocoder.com
Follow me on social media:
● / resocoder
● / resocoder
● / resocoder

Пікірлер: 160
@dennismagolo8731
@dennismagolo8731 2 жыл бұрын
28:58 read notifier 29:58 watch 2 print 32:10 dispose 39:25 ref.listen for alerts typestuff--run after 47:00 stream provider
@amitjangra4416
@amitjangra4416 Жыл бұрын
Best riverpod tutorial i found on youtube...Your efforts and such kind of nice content is worth appreciating. 😊
@Baraka0369
@Baraka0369 2 жыл бұрын
LoL, I’ve been learning Riverpod for 3 days now after using GetX, BLoC etc…. I think it’s going to be the best state management package ! Really easy to understand and to use 🔥💪 You’re just in time !!!
@ahmedibrahim-a9312
@ahmedibrahim-a9312 2 жыл бұрын
Hi is it easier than getX?
@Baraka0369
@Baraka0369 2 жыл бұрын
@@ahmedibrahim-a9312 GetX is really powerful, it allows u to make DI, State Management, Routing etc.. very easily But, you’ll can’t be able to think out of the box and your whole way of developing with Flutter will be replaced by developing in GetX, not in Flutter anymore… Riverpod is really easy to understand and very very easy to use. Much more than GetX 💪
@ahmedibrahim-a9312
@ahmedibrahim-a9312 2 жыл бұрын
@@Baraka0369 oh okkke thaanks 🔥
@moazahmed5388
@moazahmed5388 2 жыл бұрын
@@Baraka0369 you got that absolutely right !! even me using Flutter straight for more than 2 years , almost 3 years , i started to forget some basics as you don't deal with "context" anymore. also ModalBottomSheets , ScaffoldMessengers , Snackbars , Dialogs & finally .. routing , this is a mess !!
@Baraka0369
@Baraka0369 2 жыл бұрын
@@moazahmed5388 you got it… Now you are aware, let’s give Riverpod a try ! 🔥
@Outlines
@Outlines 9 ай бұрын
I've watched several Riverpod videos but this one is the most concise and clear. Thank you.
@mohammadmujahid8850
@mohammadmujahid8850 Жыл бұрын
Hello @ResoCoder, I have noticed your latest video almost a year ago, are not you working onFlutter? Please keep sharing your knowledge, it is one of the best channel for Flutter.
@user-tf4cd2rw3t
@user-tf4cd2rw3t Жыл бұрын
It scared me. I actually hope he is okay 😰 it‘s not common to just quit his passion with such a huge fanbase.
@lightkingbeknazarov7919
@lightkingbeknazarov7919 2 жыл бұрын
I respect your creativity. Everything is clear and understandable. I would really like a new playlist about blocks (ddd course) Please don't ignore your followers.
@carlhlazo931
@carlhlazo931 Жыл бұрын
Thank you for putting this out. Your approach in explaining the riverpod architecture using "familiar" concepts i.e global Class declaration, class instances made it easy for me to follow and grasp. Please keep up the great work. I really like your tutorials and your teaching approach.
@RandalLSchwartz
@RandalLSchwartz 2 жыл бұрын
Great description. Easy to follow. Will be referring many to this!
@Dieterbe
@Dieterbe Жыл бұрын
Looks like I just found the best riverpod tutorial on the internet 🎉
@highbeekayoduro1521
@highbeekayoduro1521 6 ай бұрын
This is very friendly, simple and well explained. I highly recommend this video
@learnwithkiranthami
@learnwithkiranthami 2 жыл бұрын
Holy shit, no other tutorials worked! Finally, this one shows how to do it right. Thank you!
@romeubeatotech
@romeubeatotech 2 жыл бұрын
Fantastic tutorial! At 48:30 you mention the use use of ref.read inside the counterProvider, but the riverpod documentation advises us to not do that (and use watch instead). You have a great channel!
@pattobrien5228
@pattobrien5228 2 жыл бұрын
I was just about to make the same comment... @ResoCoder any feedback here would be appreciated, thanks!
@AlamgirTamboli
@AlamgirTamboli 2 жыл бұрын
I believe he was just saying other methods that are available from a ref, but you're correct the preferred method is ref.watch.
@mijaelviricocheaparra7474
@mijaelviricocheaparra7474 2 жыл бұрын
@@AlamgirTamboli In fact they both are not the same, you can use watch when you need listen over a provider and you can use read when the interaction with the provider is "one time" and you don't need listening over it.
@colebq
@colebq 2 жыл бұрын
Depends on your use case. As @Mijael Viricochea Parra mentioned, when using `watch` your provider will refresh when the one you are watching emits a change. If using `read` it will not refresh. In the docs they are suggesting to use `watch` as that would be more "safe" down the road, in case later you decide that the provider you are reading should start emitting changes.
@AlexanderSuraphel
@AlexanderSuraphel Жыл бұрын
What was the point of webSocketClientProvider when return FakeWebSocketClient().getCounterStream(start) ; works as well inside counterProvider?
@_Amilio_
@_Amilio_ 2 жыл бұрын
Yes thank you! Been looking for an updated Riverpod tutorial at the moment
@venir_dev
@venir_dev 2 жыл бұрын
I'm sorry but this video is just covering Riverpod 1.0.0 features. Riverpod 2.0.0 (in development atm) is introducing advanced APIs to handle specific scenarios (onCancel events, caching, etc.). These are just the basics of Riverpod that were introduced in v0.14 (besides the ref.listen API)
@scottgodfrey7855
@scottgodfrey7855 2 жыл бұрын
The last time he did a tutorial on Riverpod was before 1.0.0. So, there are some api changes and widget updates that he wasn’t able to cover in the original.
@ResoCoder
@ResoCoder 2 жыл бұрын
This is an introductory tutorial for Riverpod as a whole following the syntax of the version 1.0.0/2.0.0 that doesn’t go into the advanced territory. The APIs you mentioned are maybe something for a separate tutorial.
@quangle5701
@quangle5701 2 жыл бұрын
I agree, it would be helpful to give some introduction about new features of the version 2.x comparing the version 1.x. Otherwise, the title of the video might seem to be misleading. Thanks.
@lvenir4702
@lvenir4702 2 жыл бұрын
@@ResoCoder the "whole new syntax" is about Riverpod 1.0 and doesn't belong to 2.0, where new APIs are introduced instead of what you present in the video. Nothing about riverpod 2.0 ever shows in this video.
@winneze1
@winneze1 2 жыл бұрын
Yo my new project using riverpod and you just upload this. Perfect
@subrotoxing8214
@subrotoxing8214 2 жыл бұрын
Lol just about time when i looked for riverpod tutorial thank you for this
@hongphuclevo2138
@hongphuclevo2138 2 жыл бұрын
It's perfect. Thank you. Could you do a video about data structures in dart?
@prashlovessamosa
@prashlovessamosa Жыл бұрын
Thanks man for providing knowledge for free.I want to say thank you and your channel heaven to me.
@leoingson
@leoingson 2 жыл бұрын
Dude! Perfect timing! Thanks for your hard work (of the whole team)!
@Hema115
@Hema115 2 жыл бұрын
Hi, can you make a TL;DR for returning Flutter developers? Make an All-In-One video each year that sums up all the basics (File structure, Riverpod, Freezed, Flutter Basics, and what is the right order to start an app) this video series idea is missing on youtube and would make your channel grow alot further
@antijulius
@antijulius 2 жыл бұрын
Thank you! Been looking to make the Provider => Riverpod jump!
@R3d_Devil
@R3d_Devil 2 жыл бұрын
This tutorial made me smile. Thank you for this.
@srinivasrg5125
@srinivasrg5125 5 ай бұрын
Super great tutorial! Thank You!
@yogaroutines6501
@yogaroutines6501 2 жыл бұрын
Excellent - able to understand the concepts deeper , thanks
@anmolsharma9539
@anmolsharma9539 2 жыл бұрын
Thanks for this awesome video it really helped me learning riverpod quickly. Just one request can you please make the same tutorial for the new bloc update . Thanks once again :)
@fzzz9024
@fzzz9024 2 жыл бұрын
Wow! thank you so much, considering your bootcamp to support your efforts. Much appreciated!
@h3w45
@h3w45 2 жыл бұрын
Thank you for sharing full guides like this
@akbarmasterpadi
@akbarmasterpadi 2 жыл бұрын
wow amazing content it's time to switch provider to Riverpod thanks
@christianmarpert3844
@christianmarpert3844 2 жыл бұрын
Hey, great tutorial again! thks a lot! Am using BLoC currently, well flutter_bloc which is using Provider under the hood. How would you combine Riverpod with the BLoC Pattern? Simply StreamProvider and passing the BLoC/ cubit in? As I personally do not like providing thinks down the widget tree, use get_it to pass in the BLoC/ Cubit.... maybe this could be replaced with Riverpod... just thinking loudly ;) maybe you have examples on that at hand? thks again!
@mateenmehmood5675
@mateenmehmood5675 Жыл бұрын
Riverpod is amazing. 2ndly Bloc
@EhamPala
@EhamPala 10 ай бұрын
reso coder,it's been a long time no post We're missing your teaching Sir...!!!
@heartcoder4179
@heartcoder4179 2 жыл бұрын
at 31:00 it encourages to use read to access the provider state and increment it, but in the official documentation, it encourages to use watch instead: "Using ref. read should be avoided as much as possible because it is not reactive." "If you can, it is almost always better to use watch". "You might be tempted to use ref. read to optimize the performance. But this is a very bad practice and can cause bugs that are difficult to track." "(using ref.watch) our button will not rebuild when the counter increments. It also supports cases where the counter is reset." The doc also mentions not to use ref. watch inside onPressed (watch method should not be called asynchronously). So the best practice seems to be calling ref. watch before onPressed to get a reference of the state provider, then use that reference in the onPressed to increment the state.
@MaoRecords
@MaoRecords Жыл бұрын
Thank you for this tutorial. It was clear and concise!
@_3clipse_
@_3clipse_ 6 ай бұрын
Compile time safety... you won me already
@dolbysoundsofficial9323
@dolbysoundsofficial9323 2 жыл бұрын
Riverpod Tutorial From Reso Waiting From Long time(Bootcamp)😵😋Finally Here
@glrbrasil
@glrbrasil Жыл бұрын
This was really useful! Very easy to understand. Thanks 👏
@SEOTADEO
@SEOTADEO 2 жыл бұрын
Yay Reso Coder is back!! :D
@AriPharmacist
@AriPharmacist 2 жыл бұрын
When you need something, KZbin algorithm takes care of it.
@badalah8272
@badalah8272 2 жыл бұрын
I love the voice now much better
@decodedfaith7556
@decodedfaith7556 2 жыл бұрын
thanks, this is more of an eye opener
@seatconnect224
@seatconnect224 9 ай бұрын
good tutorial, thanks
@Abdurrahman98XX
@Abdurrahman98XX 2 жыл бұрын
What a perfect timing 🌹💛
@doulainc.498
@doulainc.498 2 жыл бұрын
What! This is really great tutorial. Holy f
@sankethb.k642
@sankethb.k642 2 жыл бұрын
Feels so good to see you back
@berkaykurkcu
@berkaykurkcu 2 жыл бұрын
I would love to see an implementation with Slider, I am trying to learn Riverpod and I couldn't figure out how to take a value from Slider and provide it to Counter widget, instead of hard coding it to 5. Other than that, great introduction to Riverpod!
@mboyamichael7618
@mboyamichael7618 Жыл бұрын
You could probably use a state provider
@code_with_sanjay
@code_with_sanjay 2 жыл бұрын
After so many days ❤️
@flyte9844
@flyte9844 2 жыл бұрын
Thanks exactly what I was looking for , what is the extension for the tree view lines ?
@tbnh3908
@tbnh3908 Жыл бұрын
hello are you still there?
@user-nu2nj7mf2z
@user-nu2nj7mf2z 2 жыл бұрын
Finally I see your new video
@swtmply
@swtmply 2 жыл бұрын
Very good tutorial, may I know the extensions you use. I especially want to know the bars on every widget.
@kylerbesher9402
@kylerbesher9402 Жыл бұрын
might be a bit late for this, but in the vscode settings, search for and enable 'preview flutter ui guides' and then restart vscode
@swplogic4158
@swplogic4158 2 жыл бұрын
I love flutter_bloc.
@oussamaberhili
@oussamaberhili 10 ай бұрын
thanks man
@mandeno4063
@mandeno4063 Жыл бұрын
good work
@hafizibrohim599
@hafizibrohim599 2 жыл бұрын
Great job 👍👍👏👏
@miriamramstudio3982
@miriamramstudio3982 Жыл бұрын
Great video. Thanks!!!
@hasanibrahim4887
@hasanibrahim4887 Жыл бұрын
Thank you for this amazing tutorial. If I may ask a question, when using autoDispose on the StateNotifierProvider is causing "Tried to use ReposNotifier after `dispose` was called" do you have any idea what's happening ? thank you in advance
@aidanmacks
@aidanmacks 2 жыл бұрын
Great tutorials as always. I watched this as a means to look for breaking changes when migrating from 1.0 to 2.0 ... I cant actually see anything. Does anyone have any advice on this subject?
@trunghvbk
@trunghvbk 2 жыл бұрын
like first, watch later
@mayur5126
@mayur5126 2 жыл бұрын
Why are there two different riverpod packages, riverpod and flutter_riverpod?
@GeekyLOAF
@GeekyLOAF Жыл бұрын
make a video on the extensions you are currently using
@TheThornTech
@TheThornTech 2 жыл бұрын
Great man! Thank you so much 🥰🙏
@_dinesh
@_dinesh 2 жыл бұрын
You are awesome! Thank you so much.. Do you think this is better than BLoC?
@MrJerikoSalivan
@MrJerikoSalivan 2 жыл бұрын
Great tutorial!
@prabeshbista3457
@prabeshbista3457 2 жыл бұрын
Love from Nepal
@faisalmushtaq2287
@faisalmushtaq2287 Жыл бұрын
Can u do clean architecture using riverpod.
@bensalkb6902
@bensalkb6902 2 жыл бұрын
would be perfect if it was straight forward, felt like its laggin. But good tutorial though
@cosmic_pixel
@cosmic_pixel Жыл бұрын
This was amazing ❤
@DguruZ
@DguruZ 2 жыл бұрын
Genial! You back! Keep it up!
@user-lr6px8bq4n
@user-lr6px8bq4n Жыл бұрын
Hello ,May I ask which architecture do you suggest for flutter development ???
@YazeedAlKhalaf
@YazeedAlKhalaf 2 жыл бұрын
awesome work man!
@ozbekchajavascript1209
@ozbekchajavascript1209 Жыл бұрын
Are you alive Reso Coder ? Why aren't you uploading new videos ?
@gogalcloud
@gogalcloud Жыл бұрын
Hi Reso Coder , I have been following you for so long , I wanted to ask you what do you think about Flutterflow capability if i want to use except firebase, i have been using it from 1 week for design and animations , it doesn't provide me any state mgmt, clean architecture approach, neither testing I wanted to know your thoughts abt it ?
@zainansari1057
@zainansari1057 2 жыл бұрын
Hey can you make a video of latest flutter bloc version in DDD playlist
@moazahmed5388
@moazahmed5388 2 жыл бұрын
thanks for the content ♥
@caballero75RS
@caballero75RS 2 жыл бұрын
Thanks bro!
@irhas6555
@irhas6555 2 жыл бұрын
how to handle form validation using riverpod??
@laurapeterson146
@laurapeterson146 Жыл бұрын
I took Reso Coder's Flutter Developer Bootcamp course. But in there he used Riverpod version 0.14, which is very outdated. So I'm wondering if the course (especially the latter part about the production-ready app) is still usable regarding UI and Riverpod state management parts. Does anyone know about this?
@ElVerdaderoAbejorro
@ElVerdaderoAbejorro Жыл бұрын
25:00 "we are actually gonna rebuild the whole widget" This scares me. Are you saying if I only listen to changes in the Text() widget the whole tree will still be rebuilt instead of just the Text() widget? Because when you use StatefulWidget, only the Text() widget would be rebuilt, so if that is the case then this would be a huge performance issue.
@mangmun001
@mangmun001 2 жыл бұрын
I still waiting for full tutorials for real project examples like Riverpod + Firebase.
@cgutierr-zgz
@cgutierr-zgz 2 жыл бұрын
Hi, could you please tell me what's the VSCode extension that shows this bars joining the tree of widgets? Thanks!
@jaroslavkovar1687
@jaroslavkovar1687 Жыл бұрын
I think this is a built-in VSCode feature. To implement it, simply go to VSCode settings and search for *Dart:Preview Flutter Ui Guides* and check its box.
@gap182
@gap182 2 жыл бұрын
I would really like to join the Boot Camp, but for us Latin people is hard to pay it 😞
@becbelk
@becbelk 2 жыл бұрын
I want to ask if flutter support the micro-services architecture
@yasseralsaidi
@yasseralsaidi Жыл бұрын
Riverpod 2.0 released today, any update here?
@tedneoh6011
@tedneoh6011 2 жыл бұрын
what extension you are using with all these tree view "LL" ?
@AdamSmaka
@AdamSmaka 2 жыл бұрын
What about cubit + Riverpod on 100k subscribers celebration ? :)
@geenews6207
@geenews6207 Жыл бұрын
Why you shifted from Unity game development to Flutter?
@skirllexrude8170
@skirllexrude8170 2 жыл бұрын
Be honest ResoCoder how long it took for you to develop the github Client App and how long it took you to make that bootcamp.
@rivella99
@rivella99 2 жыл бұрын
Would you mind indexing the video?
@telostia
@telostia 9 ай бұрын
what happened to reso coder? why is this his last clip?
@aimensayoud8563
@aimensayoud8563 2 жыл бұрын
thx, but i think it needs another part , you haven't covered that much in this tuto
@iabhishekpatil4415
@iabhishekpatil4415 2 жыл бұрын
What's the solution for rebuild entire build method?? I just want to rebuild counter text widget !! one solution is to seperate text widget, what's the other?
@jorgeandresdiaz0
@jorgeandresdiaz0 2 жыл бұрын
BlocBuilder
@saadmansoor3547
@saadmansoor3547 Жыл бұрын
34:38 sounds pretty gangsta to me 🤐
@mokshmahajan6340
@mokshmahajan6340 2 жыл бұрын
At 49:05 Line no. 24, can't we just use ref.read() ?
@screamiboy
@screamiboy 2 жыл бұрын
I asked myself the same question. The riverpod documentation calls the approach with read a bad practice. But I did not found a explanation why…
@MythiPlayz
@MythiPlayz 2 жыл бұрын
I think everybody would absolutely cream their pants if you could get the developer and interview them :)
@redz4110
@redz4110 2 жыл бұрын
What if I want to pass two or more parameters to the counterProvider?
@scottgodfrey7855
@scottgodfrey7855 2 жыл бұрын
You can also provide reference types to a state notifier. So, you can also provide methods from an object that extends a state notifier. He has a video dedicated to state notifier provider in riverpod.
@TheFuckULooknAtFilms
@TheFuckULooknAtFilms 2 жыл бұрын
Create a class
@redz4110
@redz4110 2 жыл бұрын
@@TheFuckULooknAtFilms yep thanks chris, it is explained in the official documentation too, I read it just after wrote this comment
@Apenschi
@Apenschi 2 жыл бұрын
Well, I'm not sure about Riverpod! You only find very simple examples for it like counters and lists and so on. For such simple things, it is ok, to have to clone the state on every change, BUT for big, complex apps this isn't the way you want to go. When you have a lot of pages with input-forms with lets say 40 fields, date-selections, texts, combo-boxes, list with complex elements and so on..., you don't want to clone the complete state every time the users changes a field. Also you don't want to use cascading providers or provider-functions for deciding when to rebuild your widgets. What you need in this case is mutable state and fine grained control over which changes lead in which situation to a rebuild, meaning your business logic should decide which change is relevant for the GUI. So, you would need the ChangeNotifierProvider for that, like in the provider package. Riverpod has that too, but it discourages it's use!?! I'm not sure if ChangeNotifierProvider will be deprecated in the future, because Riverpod seems to be targeted rather at small apps and not for complex mobile apps or desktop apps. That's why I'm thinking about going back to the provider package.
@Pandazaar
@Pandazaar 2 жыл бұрын
just use changenotifierprovider as you said.. it won't be deprecated, he just advises it because you can forget to notify of changes and it can get messy if you don't know what you're doing or the object gets too big
@Apenschi
@Apenschi 2 жыл бұрын
@@Pandazaar Thanks! I've already decided to use riverpod and, up to now, I'm very satisfied with it! I have to withdraw my statement that it is only suitable for small projects.
@devfloody
@devfloody 2 жыл бұрын
What font you use?
@pabrcno
@pabrcno Жыл бұрын
Reso your tutorials would be 100x better if you'd speed up a little bit.
@jacopoguzzo4097
@jacopoguzzo4097 2 жыл бұрын
What's the font name of vscode?
@ccoedIT
@ccoedIT Жыл бұрын
PLs New videos😢😢😢😢
Riverpod Simplified | Easy State Management
14:17
Tadas Petra
Рет қаралды 44 М.
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 838 М.
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 41 МЛН
Apple peeling hack
00:37
_vector_
Рет қаралды 62 МЛН
State Management Like A Pro - Flutter Riverpod
10:30
Robert Brunhage
Рет қаралды 76 М.
I tried 5 Firebase alternatives
10:31
Fireship
Рет қаралды 788 М.
Flutter Testing Guide for Beginners - Part 1: Unit Tests & Setup
1:00:28
KMP vs. Flutter - Who Will Win The Cross-Platform Battle?
16:19
Philipp Lackner
Рет қаралды 46 М.
Flutter Provider EASY Tutorial
9:43
Flutter Mapp
Рет қаралды 50 М.
Coding Riverpod with creator of #Riverpod, Remi Rousselet
1:11:45
Majid Hajian
Рет қаралды 11 М.
Flutter Riverpod 2 Tutorial for Beginners | Riverpod Generator
1:54:33
Rivaan Ranawat
Рет қаралды 76 М.
Top 30 Flutter Tips and Tricks
6:50
Flutter Mapp
Рет қаралды 553 М.
Best State Management for Flutter | Flutter State Management
8:18
AI with Flutter
Рет қаралды 9 М.
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 838 М.