ValueListenableBuilder and ValueNotifier in

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • In this video I will show you how ValueListenableBuilder and ValueNotifier can be used to optimize the number of re-build of you widget tree. Using this widget you can easily re-build only selected widget from the widget tree improving the performance of your Fluter app.
    Github link:
    github.com/ufr...
    Connect with DevKage:
    ▫ Discord: / discord
    ▫ X (Twitter): / devkage
    ▫ Instagram: / devkage
    ▫ Dev.to: dev.to/devkage
    Music: Feels Like Home by Lakey Inspired
    Link: / lakeyinspired
    Want to support my work?
    ▫ Patreon: / devkage
    ▫ BuyMeACoffee: www.buymeacoff...
    ▫ GitHub sponsors: github.com/spo...

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

  • @roblesrt
    @roblesrt 3 года назад +6

    Your before and after implementation of the ValueListenableBuilder + ValueNotifier makes it easy to understand the concept. How I wish every content creator does this pattern of teaching. Thanks for sharing!

    • @DevKage
      @DevKage  3 года назад

      Thanks man!🤘🏼

  • @rick_from_yr
    @rick_from_yr Год назад +1

    Very good explanation

  • @rajun9852
    @rajun9852 2 года назад +2

    Great way of explanation👏👏

    • @DevKage
      @DevKage  2 года назад

      Glad to know that you liked it! Thanks for watching 🙂

  • @SrikanthNandiraju
    @SrikanthNandiraju 4 года назад +5

    Excellent. Succinct and right to the point. You are a Flutter Rockstar! Keep going.

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

      Thanks for those kind words!

  • @purvikrana2156
    @purvikrana2156 4 года назад +1

    This is really a well explained video. Could you explain ValueNotifier by passing an object of class which contain a int value instead of passing directly a int . I am bit confused with Passing my whole object value with ValueNotifier.

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

      I'm implementing something similar for my flutter app development series. That video will be available on coming Wednesday. So hopefully that will help you.

  • @adilmourahi
    @adilmourahi 2 года назад +1

    Great, thank you

    • @DevKage
      @DevKage  2 года назад

      Thanks for watching!🤘🏼

  • @mruduladdipalli5417
    @mruduladdipalli5417 3 года назад +1

    Great 🔥

  • @ArtswinNati
    @ArtswinNati 3 года назад +1

    how about using ValueNotifier on different page?

    • @DevKage
      @DevKage  3 года назад

      It does not matter if ValueNotifier is defined on same page or on a page way before its use. As long as you make sure that the ValueNotifier object is fully initialized and non-null before using it as a 'listenable' in a ValueListenableBuilder() widget, everything should work just fine. If you want an example you can take a look at this video where I have defined 2 ValueNotifiers a members of a class and have used them on a totally different place. ruclips.net/video/tZTaDc9QRm8/видео.html

  • @shivarajsajjan3000
    @shivarajsajjan3000 3 года назад +1

    My target widget is dependent on 3 value notifiers. In that case how to use this ValueListenableBuilder.??

    • @DevKage
      @DevKage  3 года назад +1

      I've published a package for doing exactly this, called MultiValueListenableBuilder. Unfortunately I haven't made a video on that package yet. But from the example, it should be easy to understand how to use it. Here is the link: pub.dev/packages/multi_value_listenable_builder

    • @shivarajsajjan3000
      @shivarajsajjan3000 3 года назад +1

      @@DevKage Yes. I looked at your package. It's great. You are amazing! 🙏
      Wanted to understand one thing, I have used nested ValueListenableBuilder i.e., next ValueListenableBuilder inside builder of first ValueListenableBuilder. Like this total I have used total 3 nested ValueListenableBuilder. It's working.
      Could you please tell me, which one is better w.r.t. performance. Is your package better or nested ValueListenableBuilder.?
      Why am I asking is, nested ValueListenableBuilder took me 10 lines of code. Is it better to add package or these 10 lines of nested code.?

    • @DevKage
      @DevKage  3 года назад +1

      If you compare performance of my package and your nested code, most probably you'll not see any performance difference. This is because internally my package also uses nested ValueListenableBuilder widgets. 😅
      Ignoring the fact that this package is written by me, I'll personally prefer writing my own code instead of using a package for simple cases. Having less dependencies is always better. 🤘🏻

    • @shivarajsajjan3000
      @shivarajsajjan3000 3 года назад

      @@DevKage Thank you.🙏 ಡೆವ್ ಕಾಗೆ ಅವರು ಕನ್ನಡದವರಾ.?😀

    • @DevKage
      @DevKage  3 года назад +1

      I didn't get this completely, but no, it is not related to that. It is more like "Hokage" from the anime Naruto. 😅

  • @Cherupakstmt
    @Cherupakstmt 4 года назад +2

    That is great explanation. Thanks

  • @anaydamledamle2546
    @anaydamledamle2546 3 года назад +1

    Good content. I got what I was looking for. It was a bit over complicated on StackOverflow. Your version is easy. Keep it up!

    • @DevKage
      @DevKage  3 года назад

      Thanks for watching! Glad to know that it was helpful for you. 🙂

  • @FlaviaSierro
    @FlaviaSierro 4 года назад +1

    Ohh, Look nice, but I didnt understant very well for putting on my own code, could you help me please? Can you tell me your email?

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

      Sure why not. It's hellodevkage@gmail.com. You can also join this telegram group t.me/joinchat/OaRTa0zXZaJyjWOlUa2Wtw

    • @FlaviaSierro
      @FlaviaSierro 4 года назад +1

      @@DevKage okay, I will sent you a messege today :)

  • @thongtech1984
    @thongtech1984 3 года назад +1

    exceptional explaination.

    • @DevKage
      @DevKage  3 года назад

      Thanks☺️

  • @athulkumar9370
    @athulkumar9370 3 года назад +1

    Nice presentation!

  • @poochaser6618
    @poochaser6618 Год назад

    How to change the color