How to use Provider in Flutter

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025
  • In this tutorial, you will learn how to use Provider in Flutter. You can also check out the following link to read from a written tutorial: medium.com/lev...
    Migration Provider v3 to v4: • Flutter Provider Migra...
    Code: git.io/Je4ZP
    🔥 My Website: thinkdiff.net

Комментарии • 22

  • @atiabjobayer
    @atiabjobayer 4 года назад

    This was a very good tutorial. I was having pretty difficulty understanding the concepts. This made them clear. Thank you.

  • @LarryWasHere
    @LarryWasHere 5 лет назад

    Most clear explanation so far ; )

    • @mahmud-ahsan
      @mahmud-ahsan  5 лет назад

      Thank you for watching. I wish you all the best.

  • @javohir307
    @javohir307 4 года назад

    Very helpful explanation, I have seen 2-3 tutorials before this, but could not understand. This one is great. Thanks, Btw please use dark theme :)

  • @djasynchronous7777
    @djasynchronous7777 5 лет назад

    Best Provider tut, Thank You ;)

  • @alexrizzo__93
    @alexrizzo__93 5 лет назад

    also at me like to listen classic music until I am programming, thanks for this video🙏

  • @ayoubBoumzebra
    @ayoubBoumzebra 5 лет назад +1

    Thank you, very helpful

  • @cureorganic
    @cureorganic 5 лет назад +1

    Thank you so much

  • @uzzalcontact981
    @uzzalcontact981 5 лет назад +1

    please make us some project base app java/kotlin :)
    your tutorial is almost well :)

    • @mahmud-ahsan
      @mahmud-ahsan  5 лет назад

      Thank You, I noted.

    • @uzzalcontact981
      @uzzalcontact981 5 лет назад

      @@mahmud-ahsan Thank you sir, we are waiting for your important Tutorial.

  • @creative-commons-videos
    @creative-commons-videos 5 лет назад +1

    thank you, are you Bengali ?

  • @belqisshida5345
    @belqisshida5345 5 лет назад

    how to avoid unnecessary rebuilds? example:
    Widget A.
    Widget B.
    Widget C.
    Here when I update a state in Widget A with provider, the Widgets B and C rebuilds too.
    So how to avoid unnecessary rebuilds in B and C ?

    • @mahmud-ahsan
      @mahmud-ahsan  5 лет назад

      If your widget B and Widget C don't have any changes, those will not rebuild though the root widget A rebuild. It's followed how React works. They have internal algorithm that checks the minor changes before rendering that part.

    • @belqisshida5345
      @belqisshida5345 5 лет назад

      @@mahmud-ahsan thank you, but I checked out it rebuilds Widget C even there is not changes and Widget B and C is child Widget A, when A changes the B and C also get rebuilds even C is not necessary to rebuild.

    • @mahmud-ahsan
      @mahmud-ahsan  5 лет назад

      Is this making your app slow ? or did you notice any performance issue ?

    • @belqisshida5345
      @belqisshida5345 5 лет назад +1

      @@mahmud-ahsan this is really a good way to share state between widgets, but problem is after updating one state all sub widgets get rebuilds even some widget dont have to rebuilds because the update is not related to the widget, but becuase of being sub widgets it gets rebuild. and this actually affect on app performance.
      Here in tutorial that is not a problem becuase there is less widgets, but think for a big application with more than 20 sub widgets difinitly affect on application performance.

    • @mahmud-ahsan
      @mahmud-ahsan  5 лет назад

      I understood your situation now. In React, there is a method reactjs.org/docs/react-component.html#shouldcomponentupdate by which we can tell the system that whether the component need to rebuild or not. I didn't see this type of method in Flutter, if you know please let me know. So in this case, I may need to architect the widget tree in such a way that, unnecessary builds may not happen or less happen.

  • @sasha2209
    @sasha2209 4 года назад

    Thank you So much