Provider State management - ChangeNotifier + Flutter

  Рет қаралды 27,108

Flutter Explained

Flutter Explained

Күн бұрын

Before we start with Riverpod I would like to talk about the good old Provider state management solution. The #Provider is a fantastic solution for state management and where the data come from.
You like our work and would like to support us, feel free to join us on Patreon.
/ flutterexp
Flutter State Management Docs
flutter.dev/docs/development/...
GitHub Repository
Provider Tutorial: github.com/md-weber/state_tut...
Provider Solution: github.com/md-weber/state_tut...
If you use this kind of tutorial, it would be fantastic if you could give me some feedback on how to improve the current work.
Feedback: github.com/md-weber/state_tut...
Tools we use to grow our KZbin channel
TubeBuddy Review - Manage Your KZbin Channel Easily
www.tubebuddy.com/flutterexpl...
Our current KZbin gear
🎙 Samson Mic: amzn.to/324Gpof
📟 Satechi USB-C Adapter: amzn.to/3kUdQ5M
💻 MacBook Pro: amzn.to/3iQ9MBx
📹 Lumix FZ1000: amzn.to/3g7tW8D
⭐️⭐️ Timetable ⭐️⭐️
00:00 - Introduction
00:22 - Provider Basics and Introduction
04:45 - Provider in Code
16:30 - Wrap up and Conclusion
⭐️⭐️ Follow us ⭐️⭐️
Twitter Mahtab - / mahtab_dev
Twitter Max - / flutter_exp
GitHub Mahtab - github.com/mt-tadayon
Github Max - github.com/md-weber
Homepage - flutter-explained.org/blog
⭐️⭐️ Support ⭐️⭐️
If you read this so far, thank you once more. If you like to support us, here are some links that could help me a lot.
You help us with a small donation on flutterexplained.live

Пікірлер: 54
@mivoligo
@mivoligo 4 жыл бұрын
Let's say we need 3 providers for one widget. So instead of wrapping a widget with Consumer with Consumer with Consumer... we can wrap it with 'Consumer3' for example like this: Consumer3( builder: (context, oneProvider, anotherProvider, thirdProvider, child) { return MyCustomWidget( someValue: oneProvider.someValue, anotherValue: anotherProvider.importantValue, oneMoreValue: thirdProvider.somethingElse, ); } According to documentation we can go up to Consumer6 like this.
@FlutterExplained
@FlutterExplained 4 жыл бұрын
That solves a lot of problems, thank you for sharing. I will pin it to the comments section so everyone will see it early. To make it easier readable, here is a carbon link: carbon.now.sh/k4Sf4SWoqQurH3oXHwEk
@ShafqatNadeem
@ShafqatNadeem 2 жыл бұрын
thanks mivoligo
@DavidHust
@DavidHust 3 жыл бұрын
Thank you for making this. It took me multiple videos but this one really helped make sense of it all. Appreciated.
@Toasticuss
@Toasticuss 4 жыл бұрын
Visualizing or diagramming the problem and visualizing the solution before jumping into coding would make your videos a lot easier to me.
@FlutterExplained
@FlutterExplained 4 жыл бұрын
That sounds like a great idea, thanks for the feedback I try to create a fitting diagram for the future videos.
@fazilkilicf
@fazilkilicf 3 жыл бұрын
I watched many tutorial videos but got it in this video. Thanks man!
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Great! I am really happy that it worked for you.
@iamsusmitashrestha
@iamsusmitashrestha 3 жыл бұрын
Thank you for making this video.I liked the step-wise process.Easy to visualize
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Thank you I will try to keep it like that and bring more of this step to step tutorials :)
@onuaugustine7276
@onuaugustine7276 2 жыл бұрын
wow, nice video. I like the way you explained everything clearly. Thank you.
@adamcierniak3902
@adamcierniak3902 4 жыл бұрын
Excelent video. So far I have used callback functions and "passing data by refernece" but this looks nicer.
@makemypetgamedevprocess6475
@makemypetgamedevprocess6475 3 жыл бұрын
FINALLY AFTER SO MUCH BLOC AND SETSTATE I CAN USE PROVIDER-PERFECTLY EXPLAINED!! :)
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Fantastic, great to hear that it helped you :)
@Raimkhodzhanov
@Raimkhodzhanov Жыл бұрын
Thank You! It was very interesting!
@supermath3491
@supermath3491 3 жыл бұрын
thanks man for the example it was so clear keep on
@rahultirkey7950
@rahultirkey7950 3 жыл бұрын
Thanks for making this tutorial. Its clear my doubts.
@FlutterExplained
@FlutterExplained 3 жыл бұрын
I love to hear that :)
@deoneloff
@deoneloff 3 жыл бұрын
Very good explanation and presentation!! Many thanks
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Glad it was helpful!
@askmrmoses
@askmrmoses 2 жыл бұрын
Great explanation
@kobi665
@kobi665 2 жыл бұрын
Great explanation!
@FlutterExplained
@FlutterExplained 2 жыл бұрын
Thank you
@atlantis_expedition_member4747
@atlantis_expedition_member4747 4 жыл бұрын
This is the best provider video I watched. Using the todo as a teaching method made it really easy to understand provider. Keep using it and the zoom level on the code.
@FlutterExplained
@FlutterExplained 4 жыл бұрын
Thanks for your feedback it is super motivating :).
@hemishpancholi
@hemishpancholi 3 жыл бұрын
The video was very good. was able to understand the provider in seconds. I would suggest everyone see this video.
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Fantastic, I love that it helped you.
@hemishpancholi
@hemishpancholi 3 жыл бұрын
@@FlutterExplained And also for VSCode we can use Pubspe assist extension for adding a package. It becomes so simple to add it. Just cmd+P and search Pubspec assist add the dependency. And type the name and done.
@hardiklakhalani6268
@hardiklakhalani6268 2 жыл бұрын
Finally, I understood Provider Flow! Thanks a lot, Sir for TODOs method. 👍🏻 👍🏻 LIKED & SUBSCRIBE.
@fidamuntaseer1989
@fidamuntaseer1989 3 жыл бұрын
Very clear explanation...thanks... :)
@FlutterExplained
@FlutterExplained 3 жыл бұрын
You are welcome :)
@delwarhossain43
@delwarhossain43 2 жыл бұрын
Nice. Good teacher. Thanks a lot. from Bangladesh.
@FlutterExplained
@FlutterExplained 2 жыл бұрын
Amazing thank you so much for your kind words.
@adbysantos6603
@adbysantos6603 3 жыл бұрын
Thanks for the video :)
@FlutterExplained
@FlutterExplained 3 жыл бұрын
You are most welcome :)
@yvesfricker5498
@yvesfricker5498 3 жыл бұрын
Great, thank you very much!
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Glad it was helpful!
@lorenbeall147
@lorenbeall147 4 жыл бұрын
thank you, nice content
@FlutterExplained
@FlutterExplained 4 жыл бұрын
Thank you for your kind words :)
@leonvanrijswijk8409
@leonvanrijswijk8409 4 жыл бұрын
Thanks. Nice example. Looking forward to the Riverpod-video. But could you also make a video like this on the ProxyProvider and also how that is implemented in Riverpod? The TODO's are helpful by the way.
@saidisa5956
@saidisa5956 2 жыл бұрын
Great episode! I liked how you explain every line you write, not too fast, not too slow, perfect base. just excellent! BTW, if my list is built from firestore, should I use change notifier provider (with subscription) or stream provider ?
@FlutterExplained
@FlutterExplained 2 жыл бұрын
Very good question, in general you can do both, but because you receive a stream from Firebase usually it is easier to directly use the Stream Provider.
@francescofreddi4374
@francescofreddi4374 3 жыл бұрын
best explanation that i see on youtube! how much video there is :(
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Wow, thanks! I am really happy that it helped you :)
@francescofreddi4374
@francescofreddi4374 3 жыл бұрын
@@FlutterExplained can i ask where i can find some official documentation about Flutter? i have some deep questions about Provider package... pub.dev/packages/provider here is not complete; i need a list of how much provider there is (such FutureProvider, StreamProvider... and so on). If cannot have a complete prospect of whats there are, how much i can do with all those different provider, i cannot use in a very confortable mode......... And now there is my super deep question: in a Flutter project, if i want to a simple Stream; how can I spread it in a widgetTree? If i use Provider instead StreamProvider.... or i use Provider to spread a Future results????? There is some problem??? ThankSoMuch!
@waltherleonardo8652
@waltherleonardo8652 2 жыл бұрын
great video. It help me a lot. However, I think that the app in the video is still working with the setstatescreen instead of the provider screen where we were working on
@dhanniekristanto
@dhanniekristanto 4 жыл бұрын
Would you recommend provider state management for firebase app? I used it for my project and i'm not sure if I done it right by putting the provider inside a stream builder. All the example for the provider read and watch method is always triggered by onPressed or onValue changed event. But what is the event of new incoming stream called?
@FlutterExplained
@FlutterExplained 4 жыл бұрын
That is a fantastic question. The event of a new incoming stream is going through the listen to the function of the stream itself, inside of that you can access the value of the stream and call the provider method that you want to execute. Alternatively you can use the await ... for loop for the stream to fulfil and handle the change.
@sankalpamokal9186
@sankalpamokal9186 2 жыл бұрын
How to call initstate if we are using stateless widget in this architecture?
@altearjen6838
@altearjen6838 3 жыл бұрын
would like to see an example with an auth provider, specifically for firebase
@GuilhermeCarvalhoCarneiro
@GuilhermeCarvalhoCarneiro 3 жыл бұрын
Proceed to the information that the Provider should not be used in medium and large projects as a state manager because of the limitation of ChangeNotifier in relation to the number of listiners that it can answer? Sorry for bad writing, I don't speak English
@AshishKumar-kx2ho
@AshishKumar-kx2ho Жыл бұрын
Can you make a video on hook in flutter.
List Method .sort() in Dart and Flutter
9:54
Flutter Explained
Рет қаралды 14 М.
Change Notifier Provider Explained
14:32
Learn App Code
Рет қаралды 20 М.
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 14 МЛН
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 65 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,3 МЛН
Understanding State Management in Flutter - Foundation
13:47
Flutter Explained
Рет қаралды 24 М.
Riverpod Simplified | Easy State Management
14:17
Tadas Petra
Рет қаралды 43 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 191 М.
Flutter Provider Package In Depth - Change Notifier Provider
49:53
Flutter Provider 5 changeNotifier Example | State Management
10:15
Learn Flutter with Me
Рет қаралды 23 М.
Flutter Provider: The Essential Guide
17:12
Andrea Bizzotto
Рет қаралды 69 М.
Flutter Provider Simply Explained
9:08
Learn App Code
Рет қаралды 87 М.
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 14 МЛН