I have an observation: in the ChangeNotifierProvider widget the 'builder'(6:44) argument name is now deprecated, use 'create' instead of 'builder'. By the way, great tutorial, thanks for the time and effort that you given in order to make it!
@abuzar4784 жыл бұрын
Thanks man i was really confused about this
@Musicmotivated4 жыл бұрын
Abuzar Rasool ii
@Musicmotivated4 жыл бұрын
Abuzar Rasool iii
@Musicmotivated4 жыл бұрын
Abuzar Rasool iiiiu
@Musicmotivated4 жыл бұрын
Abuzar Rasool has uto uou iii
@devonedmonds92235 жыл бұрын
This is the single best Provider tutorial I've found thus far. Many thanks Andrea!
@CodeWithAndrea5 жыл бұрын
Thank you. That was my goal.
@agoodmansaid4 жыл бұрын
@@CodeWithAndrea I totally Agree man, all others are either too long or too complex or both
@chinxeleer2 жыл бұрын
Everything he teaches is on point bro, he taught me dart lang forever appreciated Andrea
@dannykay49193 жыл бұрын
I didn't even finish the video as i'm typing this (but am about to). I just had to pause and comment to say this is a great explanation. So many state management techniques out there and some contractors were bringing in things that looked a bit foreign to me. After reading the provider packages documentation and watching this video, stuff seems super simple. Thanks for saving me some time!
@AdrianMoya5 жыл бұрын
Thanks man, the internet needed this tutorial.
@albertgeorge16194 жыл бұрын
The most simplest and easily to understand definition of Flutter Provider you would ever find over internet. Trust me I searched for a long time. Now I understood it. Thanks to Andrea for taking his time to explain it at as simplest as possible.
@quotesworld2032 жыл бұрын
I seen many of videos about notifier and consumer but I 😕 confused , after watching this video I am clear. Thank you soo much ❤️👍. You are the best teacher. ✅️
@lucy-lh1py3 жыл бұрын
I have been confuse about state management in Flutter for so long. now, it's clear thank you so much
@loldotcom9552 жыл бұрын
Best tutorials on provider in the internet
@shakibuzzaman89315 жыл бұрын
Outstanding Explanation! Diagrams can make learning so much easy. Best tutorial on provider.
@anandgupta85294 жыл бұрын
a great teacher has two qualities- knows the concept well and explains the concept well. You have mastery over these two skills. Love your tutorial. Thank you
@tak68tak5 жыл бұрын
The best tutorial on Provider I've watched!
@Anom213 жыл бұрын
Hey man just wanted to say...I've looked at quite a lot of tutorials on providers...many of which shows how to code the provider and consumers etc. But this video is the best video I've ever seen on provider. It was very simple to follow and I learned a lot about providers that didn't know before. Thanks man!!
@letsdoeverythinginoneweek93984 жыл бұрын
your explanation is great i watched many tuts but finally i understad it by watching ur video ..at last thank you for making this video
@Asdfpt4dp3 жыл бұрын
I love the way you explained this. Helped me understand flutter so much better. Thanks!!
@josecoverlessons5 жыл бұрын
you are an excellent teacher and content creator
@vital-piker2 жыл бұрын
Thanks for the video! You are a great teacher! :) Explanation is clear and sophisticated!
@_torgeek91084 жыл бұрын
This is the first video that I have came across that has helped me understand the concept and how to implement it step-by-step. Thanks for the video @Code With Andrea
@SergioArroyoSailing4 жыл бұрын
fantastic tutorial! I like the way you attack the Provider concept! One of the series on Provider I have seen so far :)
@harrymitchell58534 жыл бұрын
Thanks Andrea!! Now I have a basic understanding of Provider for state management. You did a great job of explaining how it works.
@TahirHoxha4 жыл бұрын
The best Provider tutorial, it looks so easy now.
@ckybat4 жыл бұрын
The simplicity of how you explain is excellent. Thank you very much for the time spent and how you make it easy to understand.
@yuwenpixon4 жыл бұрын
This video tutorial is awesome. The explanations are very clear. Thanks to you. Actually I bought your course at Udemy about flutter
@SajbSky3 жыл бұрын
Thank you, very well explained...Much appreciated. I listened to others tutorial and this by far has been the easiest to follow and understanding. Keep up the good work :)
@sergdigital74375 жыл бұрын
Brilliant explanation. Even the reply's on the comments are formidably accurate and well intended. I've never regretted subscribing to your channel.
@daviidon5 жыл бұрын
Thanks for this presentation, I was having a hard time wrapping my head around provider but you make it seems so simple and showed us multiple ways of doing the same thing...thanks again
@fouadamine73294 жыл бұрын
Congratulations, this is ths best explanation of provider, ever. I've been waiting for a such video, thank you sir. Please keep publishing videos on flutter app architecture.
@witsislidewanderlust3 жыл бұрын
Thanks for the tuts, especially the diagrams, it helps to illustrate the package and the concept more easier to understand.
@agoodmansaid4 жыл бұрын
God bless you man, this is the easiest to understand provider tutorial on KZbin in my opinion. Subscribing 👏🏽
@M.BilalAhmad4 жыл бұрын
Finally found a good one on Providers. You definitely deserve a subscription!
@MuhammadAbid-lp6lg4 жыл бұрын
You are awesome. Simple and straightforward explanation. Thank you sir.
@krzysztofk.88424 жыл бұрын
Duude.. you just saved me hours... I forgot to `notifyListeners` on one method in my Counter. Cheer mate. Liking a LOT!
@SabirIslamKhan4 жыл бұрын
You are very good man.. I mean, the way you explain things. It's just awesome.. so simple to understand
@skiplabacademy25703 жыл бұрын
You've made my life a lot easier man. Thanks
@whitemagehealing81263 жыл бұрын
I love your diagram explanation!
@LearnFlutterCode4 жыл бұрын
Nicely explained on the value notifier
@sameerkashyap46205 жыл бұрын
This was great! Hoping for a more in depth explanation of provider.
@CodeWithAndrea5 жыл бұрын
Coming next Monday.
@SublustrisRU4 жыл бұрын
Отлично! Это один из лучших уроков на тему Provider. Единственно, прошу - поставьте popfilter на микрофон, звук станет лучше.
@yanlay1294 жыл бұрын
Thanks man The Best Provider Tutorial
@eliteelitebob5 жыл бұрын
Excellent tutorial
@a9898575 жыл бұрын
It's very clearly to introduce "provider" by demonstrating simple sample
@spragucm4 жыл бұрын
Excellent explanation. Thanks for the info.
@TheAlex9401315 жыл бұрын
Since provider version 3.2.0 , the builder for ChangeNotifierProvider is deprecated use create instead.
@b.u.s.y.b.e.e.4 жыл бұрын
The builder under the ChangeNotifierProvider class.. what is it used for please
@MrQooje24 жыл бұрын
Great detailed explanation! Simple and easy to follow. Thanks very much!
@emadfathy17674 жыл бұрын
Good guide Andrea, thank you.
@icalculi4 жыл бұрын
after putting Consumer widget on @10:36, does that mean we no longer need.. final counter = Provider.of(context, listen:false) ? we can comment or remove this one out now correct?
@CodeWithAndrea4 жыл бұрын
Correct
@G4MR15 жыл бұрын
You made me understand Consumer better and ProviderNotifier seems useful, but currently I don't have a use case for it atm lol
@techniker87452 жыл бұрын
thanks very good explanation specially the diagrams very well done
@CodingwithDay3 жыл бұрын
Geat explanation! Thank you. Can you tell me the plugin that's been used here to show the error/problem on the screen as you type, please?
@dimitrispaxinos22944 жыл бұрын
Very nicely presented! Thank you Andrea for providing so much value. I also bought your Covid App Udemy course which has been ver helpful as well.
@indianappguy4 жыл бұрын
source code : github.com/theindianappguy/flutter_statemanagement, hope it helps
@abdelghafourabou-kacem92304 жыл бұрын
This is the best video on provider on youtube, hands down! Question: can i use this for an e comerce app to add items and remove them from a shopping cart ?
@b.u.s.y.b.e.e.4 жыл бұрын
Thanks Andrea it was straight forward.. but I wanna ask what the builder method under ChangeNotifierProvider class is used for
@yamatatsu57764 жыл бұрын
This is the best material !!! Thank you.
@prathameshacharya34574 жыл бұрын
Beautifully explained!!
@mohammaduzair6084 жыл бұрын
Thanks this has cleared all my doubts!
@mwont3 жыл бұрын
Any chance for the refreshed course? Many thinks shown here are already deprecated or not recommended any more.
@kirill45315 жыл бұрын
Good one. Looking forward for an example with passing Provider to new screens (routing)
@CodeWithAndrea5 жыл бұрын
This is planned for one of the upcoming videos.
@kirill45315 жыл бұрын
@@CodeWithAndrea awesome!
@tonychong81814 жыл бұрын
Thank you so much for your Flutter videos! Extremely helpful!
@SunilparajuliKenshin4 жыл бұрын
Hi Andrea, thanks for concise and easy tutorial , i like to ask for stateless widget, if i call my api using provider , i need to automatic call the methods (like fetchdata) once when the page is loaded so that widget rebuilds itself. By adding button it's okay but what i need it is automatically call the method.
@srhenalsr4 жыл бұрын
This is an amazing tutorial! Great work man, thanks!
@vincemelia35344 жыл бұрын
That was well explained - thanks.
@lixiang36314 жыл бұрын
so greate video about provider !! thank you so much!!!
@JobaerArman4 жыл бұрын
Very useful & easy to understand tutorial. Though I have a question about your VSCode setup. How does the error display inline?? Which extension is it?
@rajatbaniya86764 жыл бұрын
If someone has problems between 6:17 and 6:56 you can write this: home: ChangeNotifierProvider( //builder: (context) => Counter(), create: (context) => Counter(), child: MyHomePage(title: 'Flutter Demo Home Page'), ), by Ryan Hoir
@sergiofranklin88094 жыл бұрын
Amazing tutorial
@rikyriky9665 жыл бұрын
Hi Andrea!! I’d like to thank you for this one. I hope you share an extended video about provider. I can get the concepts and I’ve using provider since it first came out. However, I really don’t feel confident about state management and structure yet. A question: Is it a good practice to wrap the root of the app widget with MultiProvider? This way I can expose every provider to the whole tree. By using the “listen: false” trick, it’s possible to prevent heavy and unnecessary rebuilds of irrelevant widgets. What do you recommend? Thank you!
@CodeWithAndrea5 жыл бұрын
Yes, you can wrap the root widget with MultiProvider. I often do this to add providers for all the app services (authentication, database etc). And using "listen: false" helps reducing rebuilds as you mentioned.
@lindermannla4 жыл бұрын
Greate tutorial! thnxz Andrea!
@AnthonyBOUQUET-Globule4 жыл бұрын
You just nailed it !
@sabinjose5 жыл бұрын
Excellent tutorial!
@456324764 жыл бұрын
You're good! Please, continue.
@eliteelitebob5 жыл бұрын
What is the difference between the counter variable VS the counter used in the build method of the consumer? I can't figure it out, if I named them different things which one should i use?
@CodeWithAndrea5 жыл бұрын
Consumer.builder gives you the updated counter value as an argument, which you can/should use in the Text widget (instead of the counter instance variable). You could name it any way you wanted.
@hoandovan1vti.d2913 жыл бұрын
Thanks for your tutorial! We'll wrap `ChangeNotifierProvider` outside when we create a new, ex: new `HomePage` in main file. Is this the best practice ?
@aytunch5 жыл бұрын
Andrea thanks for this series. quick question: in the diagram at 03:31 there is the widget under yellow provider in blue. Lets say it has an extra child widget under it which does not have a listener. When the producer emits a state change and provider propagates the setstate, does that child under the provider which has nothing to do with state changes rebuild or not?
@CodeWithAndrea5 жыл бұрын
setState doesn't exist at all in this example, because all widgets are stateless with a Provider on top. Only listeners are rebuilt when the value is updated, but not the remaining widgets (see diagram at 11:16)
@kirill45315 жыл бұрын
aytunch good question. I have two news for you (bad and good): - the bad news is - "Yes", all hierarchy of children will be updated. In Consumer.built() method or in build method where we called Provider.of() method everything will be rebuilt. - the good news is that in Consumer.build() method the third parameter is a "child" which actually is a widget that will be preserved and passed as is without rebuilding it. Please check the official article about Provider here flutter.dev/docs/development/data-and-backend/state-mgmt/simple as per the doc: "The third argument is child, which is there for optimization. If you have a large widget subtree under your Consumer that doesn’t change when the model changes, you can construct it once and get it through the builder."
@aytunch5 жыл бұрын
@@kirill4531 Thanks a lot for the clarification. This was exactly what I was looking for:)
@kirill45315 жыл бұрын
@@aytunch you're welcome
@JessRasmussen-b1m3 жыл бұрын
Very good video! Thanks
@hongweiwu92694 жыл бұрын
Best tutorial !!!
@abderrazzakoxa-41495 жыл бұрын
Thank you Bro Good video ♥️
@djraven684 жыл бұрын
Great Tutorial :)
@Ohmymuyh5 жыл бұрын
Amazing explanation
@suztomo4 жыл бұрын
Thank you. I didn’t know “the widget identified by context” is used for listen: true.
@laujimmy86354 жыл бұрын
Great tutorial
@dicasdoanthony4 жыл бұрын
Great explanation!
@bilalsimsek73064 жыл бұрын
As a perspective of this tutorial, I see Provider is looks like ValueListenableBuilder widget. How I use it in my project that I have a global class and ValueNotifiers as arguments of this class. and anywhere I need to update or listen this notifiers I only assign as Global().valuenotifier. I wonder what is advantage of using Provider instead of ValueListenables and valuenotifiers?
@dhruvkelawala9605 жыл бұрын
Nice content 🤘
@stefanp47455 жыл бұрын
Hello Andrea, in other tutorials I see that they are using "Class XYZ extends ChangeNotifier" instead of "Class XYZ with ChangeNotifier". What is the difference? Thank you
@CodeWithAndrea5 жыл бұрын
You can "extend" only one class, but you can use "implement" or "with" multiple classes.
@Jdbluesky4 жыл бұрын
Wowwww, great tutorial!!! Thanks!!!
@SameenIslam4 жыл бұрын
Great video! Also, I really like the theme and the thing that provides compiler static analysis messages inline in red. Can someone give me the names of these two things? Thanks!
@SameenIslam4 жыл бұрын
Got one of them, it's called Error Lens: marketplace.visualstudio.com/items?itemName=usernamehw.errorlens
@yousseflasheen5 жыл бұрын
What is the difference between change notifier provider And provider.value ?
@CodeWithAndrea5 жыл бұрын
ChangeNotifierProvider listens to a ChangeNotifier, exposes it to its descendants and rebuilds dependents whenever the ChangeNotifier.notifyListeners is called. Provider.value only gives you access to the value, but doesn't give you a way to notify listeners when the value changes.
@iansmith33014 жыл бұрын
@@CodeWithAndrea Can you remake this for v4 of the provider?
@mcmorris10014 жыл бұрын
@@iansmith3301 All you need to do is in your ChangeNotifierProvider change the word builder to create. Around 6:42 in video.
@ofeko19975 жыл бұрын
Your awsome! great tutorials!
@SpookyHector3 жыл бұрын
How do we refresh widget when something changes in other widget? for example : there is a data table which need to be updated when we add more data via aleartbox.
@yanqingjing85823 жыл бұрын
what's the extension you are using for the quick widget add in?
@theepicguy65753 жыл бұрын
Im pretty late, but is there a way to simply run a set state when there is a change, rather than using a consumer, because I dont want to rebuild my google maps but i need to update the markers
5 жыл бұрын
Great explanation!! Just one clarification: what means __ in the "builder: (_, counter, __)"?? Thanks again.
@CodeWithAndrea5 жыл бұрын
@Ummer Ameen عمر امين Correct. So if you don't need an argument you can use underscores as placeholders.
@federico95055 жыл бұрын
what can you tell me about ChangeNotifierProxyProvider? can't just I use ChangeNotifierProvider and inside my class that extends ChangeNotifier i call Provider.of?
@CodeWithAndrea5 жыл бұрын
Yes, if it works for you, use ChangeNotifierProvider. There are a few variations of ProxyProvider. See documentation: pub.dev/packages/provider#proxyprovider
@benmarcus25774 жыл бұрын
thank you so much but why do we need so many builds?
@icalculi4 жыл бұрын
is it possible to create a form widget along with GlobalKey on a STATELESS widget?
@themindstorm99475 жыл бұрын
How do I pass a value to increment? How should I change to code if I want the onPressed to be something like counter.increment(5) ? Thanks!
@armagan_gok3 жыл бұрын
thanks a lot man you know how to teach
@Randomdude-i8x Жыл бұрын
Very usefull, thanks!
@ddorzhiev5 жыл бұрын
Hello Andrea, ty for video i have one question. why we should use flavors if we have git with git-flow
@CodeWithAndrea5 жыл бұрын
It's still a good idea to have multiple dev environments (flavors). Here's a good article: dev.to/flippedcoding/difference-between-development-stage-and-production-d0p