Flutter Provider State Management - For Beginners

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 173

  • @marcgraham780
    @marcgraham780 2 роки тому +36

    After reading several articles purporting to explain Flutter provider I was left with a headache and still did not understand provider. I saw your video today and thought, "Well, I'll give it a shot." Now I understand provider and how to implement it. And I don't have a headache. Thank you!!!

    • @FlutterMapp
      @FlutterMapp  2 роки тому +3

      That is very cool to know! Obviously this video is just the tip of the iceberg. There is much more to learn but you have the basics now 🙏

    • @zhenya42889
      @zhenya42889 Рік тому

      @@FlutterMapp In provider we have constructor, so why you does't init it in multiprivider? Your code does't work

    • @egemenedits1383
      @egemenedits1383 Рік тому

      @@zhenya42889 its not up-to-date

  • @erishsounderlatorre286
    @erishsounderlatorre286 2 роки тому +2

    The best and the quickest possible tutorial ever for flutter provider! SUBBED!

  • @eduardovinicius6047
    @eduardovinicius6047 2 роки тому

    Thanks man, I read every article there was and I still couldn't wrap my head around it. Keep it up!

  • @eboatwright_
    @eboatwright_ 2 роки тому +5

    Very simple, and straight to the point! Great job

  • @MuhammadFaizan-xq2sh
    @MuhammadFaizan-xq2sh 2 роки тому +7

    Man, this is some level explanation. Great work

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very much Faizan. I really appreciate your comment! ⚡🙏

  • @Francisco_Caceres
    @Francisco_Caceres 2 роки тому +1

    Best video you have ever published

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very much Francisco! I really appreciate it 🙏

  • @codezero1015
    @codezero1015 2 роки тому

    omg i was stuck on this topic for hrs and you told in 2 mins!!!

  • @fozcoder9685
    @fozcoder9685 Рік тому

    2:02 "No bullsh*t, no wasting time" I liked that

  • @rifkiardiansyah616
    @rifkiardiansyah616 2 роки тому +2

    such an amazing video! glad to know there is video like this!!

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very much Rifki! I do really appreciate it 🙏⚡

  • @thomaznathanael137
    @thomaznathanael137 2 роки тому +2

    Provider is the best!

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      🤣 I dont know any other soo... 🤣

  • @mostafama
    @mostafama 2 роки тому +1

    Perfect explanation

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very much Mostafa! 🚀

  • @yyujuykuyh1
    @yyujuykuyh1 Рік тому

    Thanks for the concise explanation!

  • @ricard458
    @ricard458 2 роки тому +2

    clean, easy and direct

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thanks a lot Ricard! I appreciate it 🙏

  • @qasimaliabbas
    @qasimaliabbas Рік тому

    If only everyone in my life talk like that no bullshit and straight to the point.

  • @amimulihsan5354
    @amimulihsan5354 2 роки тому +2

    That's a great explanation

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very much Amimul! 🔥⚡

  • @askmrmoses
    @askmrmoses 2 роки тому

    Amazingly explained in 2 mins. Thanks

  • @danhabib3441
    @danhabib3441 2 роки тому +3

    Nice Louis !

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Pleasure! Thanks for the comment Dan! 🚀

  • @craft123456789
    @craft123456789 2 роки тому +1

    Llevo un año en flutter y hasta hoy entendi como funcionan los providers, gracias bro

  • @menuraadithya8372
    @menuraadithya8372 2 роки тому

    Straight to the point... Great job mate.

  • @GopiCreation
    @GopiCreation 2 роки тому +3

    bloc vs getx vs provider or riverpod Comparison please

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      I will do a full comparison of all state management one day for sure ⚡

    • @GopiCreation
      @GopiCreation 2 роки тому

      @@FlutterMapp Thank you waiting for that.

  • @manuelseyram
    @manuelseyram 2 роки тому +1

    Nice short explanation of providers

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you Manuel! I appreciate your comment! ⚡

  • @VishalKumar-zc8fw
    @VishalKumar-zc8fw 2 роки тому +1

    Simple and staight to the point.

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very miuch 🙌🔥🔥🔥

  • @RianY2K
    @RianY2K 2 роки тому +5

    Provider looks good and I have try it. More simple than bloc.
    and this is officially supported by Flutter team

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thanks for the comment! I also use Provider but never tried bloc, will try next week 🙏

    • @pokapow
      @pokapow 2 роки тому +2

      @@FlutterMapp Ok you give a course right after discovering something... It's not very serious.

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      @@pokapow The flutter bloc video was created by someone who actually know bloc. I would not be able to do it without the channel "max on flutter" 🔥

  • @hoangvunguyen2592
    @hoangvunguyen2592 2 роки тому +2

    Do you have a course on flutter_hooks ?

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      I dont. I usually release courses for big content. I could do a free video about it on youtube instead 👏🙏 (one day)

  • @nizarelfennani7477
    @nizarelfennani7477 2 роки тому

    This video alone made me want to buy your course.

  • @musabmohammed7973
    @musabmohammed7973 Рік тому

    This is helpful for beginners.. please make a video on stream provider and other uses

  • @roiandal5420
    @roiandal5420 2 роки тому +1

    Make a for noobs series!!!! This is really helpful!!

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thanks a lot for the comment! I will eventually do all state management for beginners 👋🔥

  • @safiullahshah8550
    @safiullahshah8550 2 роки тому

    This video is on another fucking level! Kudos to all the hard work

  • @Baraka0369
    @Baraka0369 2 роки тому +21

    Nice job, really simple to understand, maybe you can do it for Riverpod because it's going to be the Provider 2.0 ? :) Thanks a lot, nice animation btw

    • @JhonAndrew
      @JhonAndrew 2 роки тому

      +1 on this one. I hope we could have a riverpod tutorial as well.

    • @FlutterMapp
      @FlutterMapp  2 роки тому +10

      Yeah I will do it with riverpod also eventually 🔥⚡ Thanks Adam!

    • @Baraka0369
      @Baraka0369 2 роки тому

      @@FlutterMapp Thanks bro you’re the best

    • @Hema115
      @Hema115 2 роки тому

      @@FlutterMapp I beg you to do a full Riverpod 2022 tutorial for beginners... I have learned Flutter from a course and now i don't know what is the next step! I want to build my own app but i don't wanna start on the wrong path without knowing state managment, most of the tutorials around are old, complex, and all around not enough. I have subscribed to your channel and hope that you will do it! Also you have a pretty accent :)

  • @Raj_Gada
    @Raj_Gada 2 роки тому +3

    How do you manage state with this when you are creating a model from json

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thats a good question. I will have to make a advanced video about it. this one was for beginners since I really wanted to simplify everything. 🙏

  • @aka-Monster01
    @aka-Monster01 Рік тому

    ur tutorial is like mug up it is what it is no need to go deep😁

  • @renonth
    @renonth 2 роки тому +2

    Merci c'est parfait

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Plaisir, thanks for the comment TR⚡⚡

  • @ninjaasmoke
    @ninjaasmoke 2 роки тому +2

    this is amazing

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Thank you very much Nithin! 🙏

  • @killerHumanRabbit
    @killerHumanRabbit 11 місяців тому

    thank you best explanation

  • @arhamsarwar2573
    @arhamsarwar2573 2 роки тому +2

    I Am Really Interested in your Hero Course but I don't have an amount to buy it.

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      The interest is very appreciate Arham! Thank you very much. I want to say that all the information is also available on youtube if you make some research about it, its not secret information 🙏🔥

    • @arhamsarwar2573
      @arhamsarwar2573 2 роки тому

      I like the way of your teaching but OK I understand and Will meet with you in Future soon!

  • @hayk.galstyan
    @hayk.galstyan Рік тому

    Nice video, thanks.

  • @AdamsProgrammer
    @AdamsProgrammer 2 роки тому +1

    I had difficulty understanding state management. Thank you very much. I understand it the easier way. Thing is you even use provider.

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thanks for the comment Adamu, I appreciate it 🔥

  • @abdoulraoufgambo
    @abdoulraoufgambo 2 роки тому +3

    The King of explications 😂😄😄✊✊👍👍👍👍👍👍❤️
    Please do an other for BLOC

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      I will do it for bloc realllllly soon 🙌🙌🙌🔥🔥🔥 thank you so much btw! 🙌✌

    • @thunderinvader9031
      @thunderinvader9031 2 роки тому +2

      Don't forget about cubit also please

    • @kamil10654
      @kamil10654 2 роки тому

      On the other hand he only showed basic use of Provider, there is more to it. For example, instead of creating a new function, he could've written *set* and he didn't mention Consumer widget

    • @kamil10654
      @kamil10654 2 роки тому

      If the course is like this (not really going deep), then I don't thinks it's the best one IMHO.

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      got it ⚡🔥

  • @clyqz1377
    @clyqz1377 2 роки тому +1

    Your videos are soo nice

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thank you very much! I appreciate that a lot! ⚡🙏

  • @pedrofontes8441
    @pedrofontes8441 2 роки тому +1

    what flutter version are u using? im trying to use provider but I get stuck in the nullabe thing

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Newest flutter version 🔥 this code is with null safefy 🙌

  • @tarekrefaei90
    @tarekrefaei90 2 роки тому +2

    It's similar like bloc when you call provider ,event and builder ... Right??

    • @ganeshbhat5761
      @ganeshbhat5761 2 роки тому +2

      Yes

    • @FlutterMapp
      @FlutterMapp  2 роки тому +2

      I dont really know bloc at the moment, but I will need to learn it in order to make a video about it I guess.. 🤣

    • @tarekrefaei90
      @tarekrefaei90 2 роки тому +1

      @@FlutterMapp How can you arrange your architecture (Which library do you use?)

    • @ganeshbhat5761
      @ganeshbhat5761 2 роки тому +1

      @@FlutterMapp Its personal preference I guess. For me bloc is much easier to implement and maintain. It is similar to providers.
      It has `events` which triggers `states` and you use the bloc provider to build

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      I use Provider at the moment since its the first I learned. But might change after learning bloc 🙏

  • @ashutoshsenapati6504
    @ashutoshsenapati6504 2 роки тому +3

    What architecture should be used with provider? I can't wrap my head around so many options

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      I use the most simple architecture to be honest. I call it the triple D. Display, Data, Domain. You can check the 3 free preview videos on the website, I explain how I do it ⚡ courses.fluttermapp.com/p/the-complete-flutter-course-hero-to-pro?coupon_code=PRESALE . With the 3 preview videos you can understand the concept I think and do it by yourself 🙏⚡ I hope this help

  • @hawarhekmat1174
    @hawarhekmat1174 2 роки тому +2

    what if we use read and watch instead ?

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Good question, I will have to make a advance video about it I think... I usually use it this way since its super simple. ⚡

    • @hawarhekmat1174
      @hawarhekmat1174 2 роки тому

      @@FlutterMapp thanks, i used to use read and watch, and if you help me to understand it even more it will be so awesome, thanks 🙏

  • @Pedro5antos_
    @Pedro5antos_ 2 роки тому +1

    Thanks!

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Pleasure Pedro! 🔥 Thanks for the comment!

  • @Fmrkooo
    @Fmrkooo 2 роки тому +4

    Albert Einstein once said, “Smart people simplify things.”
    You don't always need to understand 100% of the topic, sometimes all you need is just 60% in order to start working!

  • @ninjaasmoke
    @ninjaasmoke 2 роки тому +1

    How would you show a loading indicator in the UI while updating state

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      This was a very simple provider example. I dont really talk about state in this video... I know Code with andrea have a lot of videos about provider if you want 👏👏

  • @haroldpepete
    @haroldpepete 2 роки тому +2

    nice video, provider works like a react context or redux, it works in the same way, but in react you have to be very careful updating the tree component

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Thanks for the comment Harold, I appreciate it 👏⚡

  • @artarizki2234
    @artarizki2234 2 роки тому +3

    Please do GetX broo , i need it 😁

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Will do it eventually 🙏🔥Thanks Arta

    • @artarizki2234
      @artarizki2234 2 роки тому +1

      @@FlutterMapp thank you broo, i can't wait it 😅

  • @vihangarandunu
    @vihangarandunu 2 роки тому +1

    could you please create a video about parallax effect in flutter?

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      If you want the best example, there is one on Flutter.dev. docs.flutter.dev/cookbook/effects/parallax-scrolling. I hope this help 🚀

  • @M37Shadow
    @M37Shadow 2 роки тому +2

    2:23 video explains what ppl can't explain in 2:23:00 !

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      🤣🤣🤣 I know. I really try my best to make this as simple as possible. I know it can be confusing when someone start with provider/state management! 🙏 Thanks a lot!

  • @TutoGratiJavierApliArte
    @TutoGratiJavierApliArte 2 роки тому

    Necesito aprender ingles, es sin saber ingles y me estoy enterando mejor que con un curso que pague, jejeje millon de gracias
    I need to learn English, it's without knowing English and I'm finding out better than with a course that pays, hehehe thanks a million

  • @gayanlakmal2469
    @gayanlakmal2469 2 роки тому +4

    Better If you use the Consumer widget to change the data rather than declaring the variable below the Build method. 😋 Btw Nice explanation 👌

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Was not aware about this 🤯🤯 Thank you for sharing Gayan!

    • @pokapow
      @pokapow 2 роки тому +4

      @@FlutterMapp Seriously ??
      You give a course on providers and you do not know the Consumer widget ?

  • @janphillipjuntado
    @janphillipjuntado 2 роки тому +1

    Hello, nice video. How is it different from using a class directly?

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      The difference is you don't have to use setstate 🙏 the provider is now the 'setstate' 🚀

    • @sahilshah9047
      @sahilshah9047 Рік тому +1

      when u have multiple pages , and u have to reflect changes on all then u can use provider , eg when u change your username in instagram , it reflects to comments , messages , your profile. etc , so it can all be done in one line of code

    • @sahilshah9047
      @sahilshah9047 Рік тому +1

      according to my understanding

    • @janphillipjuntado
      @janphillipjuntado Рік тому

      Thank you for the explanation 🙇🏻‍♂️

  • @xeudodev
    @xeudodev 2 роки тому +1

    Bonne vidéo !

  • @100yrsdeath
    @100yrsdeath 2 роки тому +2

    Does your course have any affiliates? If so please let me know the application process as I would love to help sell your course everywhere

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Damnnn thank you very much Patel! Send me a message on instagram @flutterMapp 🔥⚡

  • @xtraszone
    @xtraszone 2 роки тому +1

    Super nice

  • @M37Shadow
    @M37Shadow 2 роки тому +2

    No bull shit no wasting time ♥

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      looool 🤣 Thanks for the comment!

  • @LungeloNgcemu
    @LungeloNgcemu Рік тому

    thank you thank you

  • @petroniobonavides3530
    @petroniobonavides3530 2 роки тому +1

    How about mobx?

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      🧐🧐🧐 If we have a lot of request about it I guess

  • @AlexAstudillo1
    @AlexAstudillo1 2 роки тому +1

    Provider is very easy, but always need context and consume more resources because don't dispose provider when close page.
    GetX dispose and delete controller when back or close the page.
    How to make Provider release resources?

    • @phrossenlifestyle9583
      @phrossenlifestyle9583 2 роки тому +1

      @@cmmsilva yes they do have default disposers

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      I would like to learn GetX also! To see the difference. I will do a video about it eventually Alex. Thanks for the comment 🔥

  • @shivz732
    @shivz732 2 роки тому +2

    I been using provider but it seriously works like a black box ie. You can't know if your widget has that provider in the parent widgets unless you run the code. It's a downfall. Also multiple same providers will clash and the most deep one will be selected

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Didnt know about this 🧠🤯. Will do bloc next week 🙏

  • @thanhhoile9462
    @thanhhoile9462 2 роки тому +2

    GetX please

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Will do bloc before since the community post have more vote for it 🤣 I will do all of them eventually ⚡

  • @M37Shadow
    @M37Shadow 2 роки тому +1

    we need bloc and getx also

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Will do them eventually for sure 🔥⚡

  • @dawidniedzwiecki
    @dawidniedzwiecki 2 роки тому +1

    Why did you make a tutorial for Provider first, if Cubit has won the poll?

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Because provider was easier and I didnt finish to learn about bloc yet 🤣 Tomorrow the video is about Bloc 🔥

  • @chagantisubhash
    @chagantisubhash 2 роки тому

    Why should we use this??

  • @najam66336
    @najam66336 2 роки тому +1

    If we use consumer widget then it should be working on not if working then write me the code with using consumer widget

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Im not sure to understand this sentence to be honest... 🧐🧐🧐

    • @najam66336
      @najam66336 2 роки тому

      @@FlutterMapp
      I say that how we use consumer widget in the provider

  • @Diogogodiow
    @Diogogodiow 2 роки тому +2

    Should, instead of declaring the provider on the build method, use Consumer. And even more important than that, don't ever use global MultiProvider. Providers should be nested on the widget tree. Only create Providers when you really want to use them. For example, the ChangeNotifierProvider could be called inside the build method of a view.

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Thanks for the comment Diogo! I will remember next time to use the consumer 🙏🚀

    • @3litepker
      @3litepker 2 роки тому

      Why wouldn't you use a global multiprovider? Isn't the whole point in that to use the provider wherever you want?

    • @Diogogodiow
      @Diogogodiow 2 роки тому +1

      @@3litepker basically, each widget (being a view or not) should have it's own state controller, that gets created when needed and disposed when the widget is no longer on the widget tree. for example, if you use a global controller, lets say the user sign in, and then sign out. that controller would still hold information about that user, unless you manually implement something to dispose that data, which is not recommended.

  • @ghulammurtaza7959
    @ghulammurtaza7959 2 роки тому

    I Want your paid courses but I can't afford to buy 😞

  • @Shynei
    @Shynei 2 роки тому +1

    Are you french ?

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Yes I am! Et toi aussi Shynei? 🙏

    • @Shynei
      @Shynei 2 роки тому +1

      Oui j’ai reconnu ton accent haha

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      @@Shynei tu viens de ou? France/Canada/autre? (Je suis de montréal, canada)

    • @Shynei
      @Shynei 2 роки тому

      @@FlutterMapp Quebec

  • @tikka6554
    @tikka6554 2 роки тому +2

    😂👌

  • @martinseal1987
    @martinseal1987 2 роки тому +2

    Good video, hate provider

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      looool, which one you like? 🔥⚡ Thank you also Martin

    • @martinseal1987
      @martinseal1987 2 роки тому

      @@FlutterMapp none lol provider ties you up to much in your own widgets heirarchy bloc is far too much boiler plate so it cubit not tried riverpod, but I have my own implementation where I use Rx dart behavior subjects and getIt for dependency injection

  • @yaroslavmakarov2218
    @yaroslavmakarov2218 2 роки тому

    Or use Inherited!

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      I have never try inherited to be honest? It does the same? ⚡⚡

  • @amiraw5494
    @amiraw5494 2 роки тому

    Wecwant bloc

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      I will do it soon 🤣⚡🔥

  • @daveit1337
    @daveit1337 2 роки тому +2

    A little bit over complicated

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      I think you are right, It could have been a little bit more simple 🤣 I will try again tomorrow with bloc 🚀

  • @apparaopapi2613
    @apparaopapi2613 2 роки тому +1

    Really not the one I expected.
    This is too simple.
    I expected something with rest api.

    • @FlutterMapp
      @FlutterMapp  2 роки тому +1

      Yes its very simple explanation, it very hard to mix things together in youtube videos (api + provider) since its a double promise of the video. In this way it make the video a little bit more complex. Also, more specific a video is, less views it will get. Less views = youtube don't recommend the channel = Flutter Mapp can't make more and more videos 🤣 It's a long answer.. I do appreciate your comment Apparao, I hope this make any sence, otherwise let me know what you think, I always appreciate feedback! 🔥

    • @apparaopapi2613
      @apparaopapi2613 2 роки тому

      @@FlutterMapp The video is good enough I think. All I have to do is integrate api myself.
      I just thought when you are asking for library, I thought it will be atleast like one of the 10 mins video kind of thing, like responsive UI you made long back.
      That's it.
      Sorry for misunderstanding though.
      And thank you for the video.

    • @apparaopapi2613
      @apparaopapi2613 2 роки тому

      @@FlutterMapp
      And try to avoid Marvel and DC battle here 🙂

  • @Henry3dev
    @Henry3dev 2 роки тому +1

    damn i still dont unserstand

    • @FlutterMapp
      @FlutterMapp  2 роки тому

      Damn.. The explanation was not good enough then 🤣 I will try again tomorrow with bloc!

  • @chomanthapa
    @chomanthapa 2 роки тому +1

    I didn’t watch it. I am not a noob 😡

  • @dev.faizan
    @dev.faizan 2 роки тому

    haha for noob..it think this video special for me 😂