Understanding State Management in Flutter - Foundation

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 54

  • @goddardpk
    @goddardpk 3 роки тому +7

    Max, thanks for the high level introduction to state management and the clean use of diagrams to support your descriptions!

    • @FlutterExplained
      @FlutterExplained  3 роки тому

      You are most welcome Paul, thank you for your amazing feedback :)

  • @aravindc6946
    @aravindc6946 4 роки тому +3

    Thanks for the video. Now I have a clear idea to start with State management

  • @faihan988
    @faihan988 3 роки тому +3

    That's a top quality video. You definitely deserve a lot more views and subscribers.

  • @anyiethaguekayuen5688
    @anyiethaguekayuen5688 3 роки тому +1

    Thanks for your explanation, it is clear enough.

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

    Thanks for the overview. I wonder if it is possible to recommend a state management package for a specific use case like a Flutter UI with a network client underneath that sends commands to a server and then react depending on the server responses, i.e. changes the UI. From the overview looks like BLOC is a good fit, but maybe I am wrong? What would you recommend?

  • @meylisannagurbanow3455
    @meylisannagurbanow3455 3 роки тому +1

    I like your videos buddy. You crushing it!

  • @PaulMsegeya
    @PaulMsegeya 3 роки тому +1

    Awesome content, keep up the good work.

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

    Hi , I came across getx package for state management.
    What do you think about this package?

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

      Hi Lovin, a lot of users of Flutter love getX and would recommend it. I personally be very careful with it. In my opinion a it is a anti pattern to have a package that tries to solve every problem. It is not only state management it is also routing, DI and more.
      It can be a great help to get something up and running, but if you search for long time solutions in a larger project I would not recommend it because the maintenance price tag could become quite large.

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

    it would have been better, if you have shown any code. anyhow good video, thank you.

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

      There are multiple follow up videos for different state management libs like setState / provider and redux :) feel free to check them out.

  • @Saketjsaket
    @Saketjsaket 4 роки тому +1

    I really loved the video. Is it possible to use redux in combination with bloc? and is it a good idea to do it?

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

      Thanks for your feedback :). Is it possible, I am pretty sure, and there is already a package that does exactly this. There is even a package that tries to achieve exactly that. pub.dev/packages/bloc_redux
      But I am not sure if it is a good idea, behind each package there are a big fanbase and community, and most likely there is a reason why they decided for one pattern or the other. Another way would be to work with RxDart and create your own "bloc" pattern like, for example, GroovinChip and Luke Pighetti explained in their interviews.

  • @Darthilandia
    @Darthilandia 3 роки тому +1

    Nice video mate!

  • @ivanyoed
    @ivanyoed 3 роки тому +1

    I kept waiting for GetX. Besides, this state management package is more used and famous than all the others mentioned, except for Provider. Hopefully you'll talk about it later. Anyways. Thank you for making this video and again, nice Job! Sharing this vid.

    • @FlutterExplained
      @FlutterExplained  3 роки тому +1

      Hi thanks for letting me know, I have getX on my todos, but I am a bit negativly biased and want to try to get more information and maybe talk with some experts before I announce my oppinion to it :). I am happy that you liked the session so far.

    • @ivanyoed
      @ivanyoed 3 роки тому +1

      @@FlutterExplained Thanks! It seems to me that you are proceeding professionally, and I like that. Hoping to watch that video! And again, keep it up!

  • @jrheisler
    @jrheisler 4 роки тому +1

    Very good video, thank you!

    • @FlutterExplained
      @FlutterExplained  4 роки тому

      You are very welcome, I am glad that you enjoyed it!

  • @dipakbari4
    @dipakbari4 3 роки тому

    In the context of State Management of Flutter, Can we say like State Class used to return the state object that contains Stateful Widget? [Especially when the createState() method called.]

    • @FlutterExplained
      @FlutterExplained  3 роки тому +1

      Uf, that is a tough one. I gutess you could say that. The only problem is that there is more than just a Stateful Widget that could contain state, also Services that are used inside of your widgets could contain state. But as a general rule of thumb I guess this is pretty accurate!

  • @eleazarfederio1718
    @eleazarfederio1718 3 роки тому +1

    Does stateless is like functional component in react?

  • @Toasticuss
    @Toasticuss 4 роки тому +1

    What are examples of too much boiler plate code with the provider package? It seems to have the least amount.

    • @FlutterExplained
      @FlutterExplained  4 роки тому +1

      Hi Toasticuss, for me, it started the first time I required three different ChangeNotifier at one point and, I needed to wrap three Consumers around each other. That lead to a tremendous sized widget. It could be that it was just wrongly used, but other packages helped me there a lot. I think that Provider is a right choice and will work, but in large-scale projects, I would not rely solely on it. Maybe more boilerplate was wrongly chosen, and it should be more confusing or bloated widget tree.

    • @mivoligo
      @mivoligo 4 роки тому +1

      @@FlutterExplained You can use MultiProvider in order to make the code look cleaner. pub.dev/documentation/provider/latest/provider/MultiProvider-class.html

    • @FlutterExplained
      @FlutterExplained  4 роки тому

      But this helps only with the registration not with the consumer right?

    • @mivoligo
      @mivoligo 4 роки тому +1

      @@FlutterExplained I think it depends on the situation. I'm trying to learn Flutter myself at the moment, so unfortunately I don't know if I do this right but I wrap each widget separately with Consumer if it needs to be notified about changes.

    • @FlutterExplained
      @FlutterExplained  4 роки тому +1

      @@mivoligo That sounds right :) the problem is just that if you have a widget that needs multiple consumers, then the widget tree gets bit messy but I will show in my video what I mean :). Thanks for sharing your conserns.

  • @bobobobo3142
    @bobobobo3142 4 роки тому +1

    What about Provider? Is it good enough?

    • @FlutterExplained
      @FlutterExplained  4 роки тому +3

      Yes of course in 8:44 I talked about it. It is great in most cases and in smaller apps. You could only run into long-term issues with boilerplating and other packages have additional features that help but the trade off is higher. I hope that helps.

  • @atlantis_expedition_member4747
    @atlantis_expedition_member4747 4 роки тому +1

    I'm learning state management for the first time at moment. I loved the video as an overview of the current solutions. I can't wait for the provider video. I think it's the best one to start with for beginners.
    Note: maybe it's my phone speaker, but the audio can be improved. It's slightly not enjoyable to listen to.

    • @FlutterExplained
      @FlutterExplained  4 роки тому +1

      Thanks for the note I will check and look if I can improve it for the next time :)

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 3 роки тому

    Is it like global variables in a way?

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

      Great question! Not really, a global variable could contain state as for example Riverpod does. But Not all global variables are state. It is the state you want the program to be in if the global variable contains the background color, then yes it is your state of the background color. If you use the global variable only to contain information that you need for a calculation then no it is not really the state. I hope that helps.

  • @dipakbari4
    @dipakbari4 3 роки тому +1

    12:10 Best State Management solution is here. :-)

    • @FlutterExplained
      @FlutterExplained  3 роки тому +1

      Wow this video is recorded on the 2. June :O how much has changed since then is absolutly incredible.

    • @dipakbari4
      @dipakbari4 3 роки тому

      @@FlutterExplained 😀. Whenever I get doubts I usually look for "MyFlutterDoubts flutter explained" 😂🤣

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

    👍👍

  • @abhishekbhambure5146
    @abhishekbhambure5146 4 роки тому +1

    SUBED

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

    GetX?

  • @farseenabdulsalam6246
    @farseenabdulsalam6246 3 роки тому +1

    1. Explanation of individual methods were very shallow.
    2. Introduction wasnt concise. Over explained introduction.
    Very low signal to noise ratio.