Flutter Provider: The Essential Guide

  Рет қаралды 69,699

Andrea Bizzotto

Andrea Bizzotto

Күн бұрын

Пікірлер: 161
@joaorafael6202
@joaorafael6202 5 жыл бұрын
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!
@abuzar478
@abuzar478 4 жыл бұрын
Thanks man i was really confused about this
@Musicmotivated
@Musicmotivated 4 жыл бұрын
Abuzar Rasool ii
@Musicmotivated
@Musicmotivated 4 жыл бұрын
Abuzar Rasool iii
@Musicmotivated
@Musicmotivated 4 жыл бұрын
Abuzar Rasool iiiiu
@Musicmotivated
@Musicmotivated 4 жыл бұрын
Abuzar Rasool has uto uou iii
@devonedmonds9223
@devonedmonds9223 5 жыл бұрын
This is the single best Provider tutorial I've found thus far. Many thanks Andrea!
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
Thank you. That was my goal.
@agoodmansaid
@agoodmansaid 4 жыл бұрын
@@CodeWithAndrea I totally Agree man, all others are either too long or too complex or both
@chinxeleer
@chinxeleer 2 жыл бұрын
Everything he teaches is on point bro, he taught me dart lang forever appreciated Andrea
@dannykay4919
@dannykay4919 3 жыл бұрын
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!
@AdrianMoya
@AdrianMoya 5 жыл бұрын
Thanks man, the internet needed this tutorial.
@albertgeorge1619
@albertgeorge1619 4 жыл бұрын
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.
@quotesworld203
@quotesworld203 2 жыл бұрын
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-lh1py
@lucy-lh1py 3 жыл бұрын
I have been confuse about state management in Flutter for so long. now, it's clear thank you so much
@loldotcom955
@loldotcom955 2 жыл бұрын
Best tutorials on provider in the internet
@shakibuzzaman8931
@shakibuzzaman8931 5 жыл бұрын
Outstanding Explanation! Diagrams can make learning so much easy. Best tutorial on provider.
@anandgupta8529
@anandgupta8529 4 жыл бұрын
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
@tak68tak
@tak68tak 5 жыл бұрын
The best tutorial on Provider I've watched!
@Anom21
@Anom21 3 жыл бұрын
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!!
@letsdoeverythinginoneweek9398
@letsdoeverythinginoneweek9398 4 жыл бұрын
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
@Asdfpt4dp
@Asdfpt4dp 3 жыл бұрын
I love the way you explained this. Helped me understand flutter so much better. Thanks!!
@josecoverlessons
@josecoverlessons 5 жыл бұрын
you are an excellent teacher and content creator
@vital-piker
@vital-piker 2 жыл бұрын
Thanks for the video! You are a great teacher! :) Explanation is clear and sophisticated!
@_torgeek9108
@_torgeek9108 4 жыл бұрын
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
@SergioArroyoSailing
@SergioArroyoSailing 4 жыл бұрын
fantastic tutorial! I like the way you attack the Provider concept! One of the series on Provider I have seen so far :)
@harrymitchell5853
@harrymitchell5853 4 жыл бұрын
Thanks Andrea!! Now I have a basic understanding of Provider for state management. You did a great job of explaining how it works.
@TahirHoxha
@TahirHoxha 4 жыл бұрын
The best Provider tutorial, it looks so easy now.
@ckybat
@ckybat 4 жыл бұрын
The simplicity of how you explain is excellent. Thank you very much for the time spent and how you make it easy to understand.
@yuwenpixon
@yuwenpixon 4 жыл бұрын
This video tutorial is awesome. The explanations are very clear. Thanks to you. Actually I bought your course at Udemy about flutter
@SajbSky
@SajbSky 3 жыл бұрын
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 :)
@sergdigital7437
@sergdigital7437 5 жыл бұрын
Brilliant explanation. Even the reply's on the comments are formidably accurate and well intended. I've never regretted subscribing to your channel.
@daviidon
@daviidon 5 жыл бұрын
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
@fouadamine7329
@fouadamine7329 4 жыл бұрын
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.
@witsislidewanderlust
@witsislidewanderlust 3 жыл бұрын
Thanks for the tuts, especially the diagrams, it helps to illustrate the package and the concept more easier to understand.
@agoodmansaid
@agoodmansaid 4 жыл бұрын
God bless you man, this is the easiest to understand provider tutorial on KZbin in my opinion. Subscribing 👏🏽
@M.BilalAhmad
@M.BilalAhmad 4 жыл бұрын
Finally found a good one on Providers. You definitely deserve a subscription!
@MuhammadAbid-lp6lg
@MuhammadAbid-lp6lg 4 жыл бұрын
You are awesome. Simple and straightforward explanation. Thank you sir.
@krzysztofk.8842
@krzysztofk.8842 4 жыл бұрын
Duude.. you just saved me hours... I forgot to `notifyListeners` on one method in my Counter. Cheer mate. Liking a LOT!
@SabirIslamKhan
@SabirIslamKhan 4 жыл бұрын
You are very good man.. I mean, the way you explain things. It's just awesome.. so simple to understand
@skiplabacademy2570
@skiplabacademy2570 3 жыл бұрын
You've made my life a lot easier man. Thanks
@whitemagehealing8126
@whitemagehealing8126 3 жыл бұрын
I love your diagram explanation!
@LearnFlutterCode
@LearnFlutterCode 4 жыл бұрын
Nicely explained on the value notifier
@sameerkashyap4620
@sameerkashyap4620 5 жыл бұрын
This was great! Hoping for a more in depth explanation of provider.
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
Coming next Monday.
@SublustrisRU
@SublustrisRU 4 жыл бұрын
Отлично! Это один из лучших уроков на тему Provider. Единственно, прошу - поставьте popfilter на микрофон, звук станет лучше.
@yanlay129
@yanlay129 4 жыл бұрын
Thanks man The Best Provider Tutorial
@eliteelitebob
@eliteelitebob 5 жыл бұрын
Excellent tutorial
@a989857
@a989857 5 жыл бұрын
It's very clearly to introduce "provider" by demonstrating simple sample
@spragucm
@spragucm 4 жыл бұрын
Excellent explanation. Thanks for the info.
@TheAlex940131
@TheAlex940131 5 жыл бұрын
Since provider version 3.2.0 , the builder for ChangeNotifierProvider is deprecated use create instead.
@b.u.s.y.b.e.e.
@b.u.s.y.b.e.e. 4 жыл бұрын
The builder under the ChangeNotifierProvider class.. what is it used for please
@MrQooje2
@MrQooje2 4 жыл бұрын
Great detailed explanation! Simple and easy to follow. Thanks very much!
@emadfathy1767
@emadfathy1767 4 жыл бұрын
Good guide Andrea, thank you.
@icalculi
@icalculi 4 жыл бұрын
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?
@CodeWithAndrea
@CodeWithAndrea 4 жыл бұрын
Correct
@G4MR1
@G4MR1 5 жыл бұрын
You made me understand Consumer better and ProviderNotifier seems useful, but currently I don't have a use case for it atm lol
@techniker8745
@techniker8745 2 жыл бұрын
thanks very good explanation specially the diagrams very well done
@CodingwithDay
@CodingwithDay 3 жыл бұрын
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?
@dimitrispaxinos2294
@dimitrispaxinos2294 4 жыл бұрын
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.
@indianappguy
@indianappguy 4 жыл бұрын
source code : github.com/theindianappguy/flutter_statemanagement, hope it helps
@abdelghafourabou-kacem9230
@abdelghafourabou-kacem9230 4 жыл бұрын
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.
@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
@yamatatsu5776
@yamatatsu5776 4 жыл бұрын
This is the best material !!! Thank you.
@prathameshacharya3457
@prathameshacharya3457 4 жыл бұрын
Beautifully explained!!
@mohammaduzair608
@mohammaduzair608 4 жыл бұрын
Thanks this has cleared all my doubts!
@mwont
@mwont 3 жыл бұрын
Any chance for the refreshed course? Many thinks shown here are already deprecated or not recommended any more.
@kirill4531
@kirill4531 5 жыл бұрын
Good one. Looking forward for an example with passing Provider to new screens (routing)
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
This is planned for one of the upcoming videos.
@kirill4531
@kirill4531 5 жыл бұрын
@@CodeWithAndrea awesome!
@tonychong8181
@tonychong8181 4 жыл бұрын
Thank you so much for your Flutter videos! Extremely helpful!
@SunilparajuliKenshin
@SunilparajuliKenshin 4 жыл бұрын
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.
@srhenalsr
@srhenalsr 4 жыл бұрын
This is an amazing tutorial! Great work man, thanks!
@vincemelia3534
@vincemelia3534 4 жыл бұрын
That was well explained - thanks.
@lixiang3631
@lixiang3631 4 жыл бұрын
so greate video about provider !! thank you so much!!!
@JobaerArman
@JobaerArman 4 жыл бұрын
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?
@rajatbaniya8676
@rajatbaniya8676 4 жыл бұрын
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
@sergiofranklin8809
@sergiofranklin8809 4 жыл бұрын
Amazing tutorial
@rikyriky966
@rikyriky966 5 жыл бұрын
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!
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
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.
@lindermannla
@lindermannla 4 жыл бұрын
Greate tutorial! thnxz Andrea!
@AnthonyBOUQUET-Globule
@AnthonyBOUQUET-Globule 4 жыл бұрын
You just nailed it !
@sabinjose
@sabinjose 5 жыл бұрын
Excellent tutorial!
@45632476
@45632476 4 жыл бұрын
You're good! Please, continue.
@eliteelitebob
@eliteelitebob 5 жыл бұрын
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?
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
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.d291
@hoandovan1vti.d291 3 жыл бұрын
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 ?
@aytunch
@aytunch 5 жыл бұрын
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?
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
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)
@kirill4531
@kirill4531 5 жыл бұрын
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."
@aytunch
@aytunch 5 жыл бұрын
@@kirill4531 Thanks a lot for the clarification. This was exactly what I was looking for:)
@kirill4531
@kirill4531 5 жыл бұрын
@@aytunch you're welcome
@JessRasmussen-b1m
@JessRasmussen-b1m 3 жыл бұрын
Very good video! Thanks
@hongweiwu9269
@hongweiwu9269 4 жыл бұрын
Best tutorial !!!
@abderrazzakoxa-4149
@abderrazzakoxa-4149 5 жыл бұрын
Thank you Bro Good video ♥️
@djraven68
@djraven68 4 жыл бұрын
Great Tutorial :)
@Ohmymuyh
@Ohmymuyh 5 жыл бұрын
Amazing explanation
@suztomo
@suztomo 4 жыл бұрын
Thank you. I didn’t know “the widget identified by context” is used for listen: true.
@laujimmy8635
@laujimmy8635 4 жыл бұрын
Great tutorial
@dicasdoanthony
@dicasdoanthony 4 жыл бұрын
Great explanation!
@bilalsimsek7306
@bilalsimsek7306 4 жыл бұрын
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?
@dhruvkelawala960
@dhruvkelawala960 5 жыл бұрын
Nice content 🤘
@stefanp4745
@stefanp4745 5 жыл бұрын
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
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
You can "extend" only one class, but you can use "implement" or "with" multiple classes.
@Jdbluesky
@Jdbluesky 4 жыл бұрын
Wowwww, great tutorial!!! Thanks!!!
@SameenIslam
@SameenIslam 4 жыл бұрын
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!
@SameenIslam
@SameenIslam 4 жыл бұрын
Got one of them, it's called Error Lens: marketplace.visualstudio.com/items?itemName=usernamehw.errorlens
@yousseflasheen
@yousseflasheen 5 жыл бұрын
What is the difference between change notifier provider And provider.value ?
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
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.
@iansmith3301
@iansmith3301 4 жыл бұрын
@@CodeWithAndrea Can you remake this for v4 of the provider?
@mcmorris1001
@mcmorris1001 4 жыл бұрын
@@iansmith3301 All you need to do is in your ChangeNotifierProvider change the word builder to create. Around 6:42 in video.
@ofeko1997
@ofeko1997 5 жыл бұрын
Your awsome! great tutorials!
@SpookyHector
@SpookyHector 3 жыл бұрын
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.
@yanqingjing8582
@yanqingjing8582 3 жыл бұрын
what's the extension you are using for the quick widget add in?
@theepicguy6575
@theepicguy6575 3 жыл бұрын
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.
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
@Ummer Ameen عمر امين Correct. So if you don't need an argument you can use underscores as placeholders.
@federico9505
@federico9505 5 жыл бұрын
what can you tell me about ChangeNotifierProxyProvider? can't just I use ChangeNotifierProvider and inside my class that extends ChangeNotifier i call Provider.of?
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
Yes, if it works for you, use ChangeNotifierProvider. There are a few variations of ProxyProvider. See documentation: pub.dev/packages/provider#proxyprovider
@benmarcus2577
@benmarcus2577 4 жыл бұрын
thank you so much but why do we need so many builds?
@icalculi
@icalculi 4 жыл бұрын
is it possible to create a form widget along with GlobalKey on a STATELESS widget?
@themindstorm9947
@themindstorm9947 5 жыл бұрын
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_gok
@armagan_gok 3 жыл бұрын
thanks a lot man you know how to teach
@Randomdude-i8x
@Randomdude-i8x Жыл бұрын
Very usefull, thanks!
@ddorzhiev
@ddorzhiev 5 жыл бұрын
Hello Andrea, ty for video i have one question. why we should use flavors if we have git with git-flow
@CodeWithAndrea
@CodeWithAndrea 5 жыл бұрын
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
@askmrmoses
@askmrmoses 2 жыл бұрын
Very helpful!
Advanced Provider Tutorial - Part 1: Project Setup & Authentication Flow
13:43
Flutter Provider EASY Tutorial
9:43
Flutter Mapp
Рет қаралды 62 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
This Library Makes State Management So Much Easier
12:07
Web Dev Simplified
Рет қаралды 137 М.
Flutter State Management - The Grand Tour
14:07
Fireship
Рет қаралды 248 М.
Implementing complex UI with Flutter - Marcin Szałek | Flutter Europe
44:26
Flutter Provider: Introduction
9:55
Andrea Bizzotto
Рет қаралды 94 М.
State Management Like A Pro - Flutter Riverpod
10:30
Robert Brunhage
Рет қаралды 77 М.
Provider 📱 Simple State Management • Flutter Tutorial
5:48
Flutter Provider - Advanced Firebase Data Management
11:08
Fireship
Рет қаралды 145 М.
Flutter Provider State Management in 7 minutes
7:01
Rivaan Ranawat
Рет қаралды 16 М.