Flutter Tutorial - Builder & BuildContext - Everyone should understand this - Deep Dive

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

КОМЕНТАРІ • 66

  • @3alemneUp
    @3alemneUp Рік тому +1

    excellent explanation... after reading through a lot of articles without grasping the meaning behind context, I finally understood thanks to you Johannes, Thank you very much.

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

      Glad I could be of help, You are welcome علمني اب - 3alemneUP! 😊

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

    Just perfect. If every video of yours is as clear as this one, you will be my saviour.

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

      Thank you, Tuğberk! 🙂 Sure I try to get better and better over time simply check out my Flutter playlist: ua-cam.com/video/HZD-0zgpuak/v-deo.html

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

    Brother, understanding the concept of builder context is so crucial that no other tutorial or article can explain like you did.

  • @sankethb.k642
    @sankethb.k642 2 роки тому +1

    I never really understood how context works before this. Thanks a lot!!

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

    You make these very easy to understand. Kudos!!

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

    Hahaha 😂 😂 😂 😂 oooh my God why was struggling with Build context ? Because i didn't have a good teacher until now.... Thanks keep up the good work man hands to head salute

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

    I waited for this video so long... and finally it's here
    Thanks a lot

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

    Seems I finally found someone I can listen to

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

    This should be studied sooner...
    i was facing the issue "At this point the state of the widget's element tree is no longer stable."
    so need to go back to basic....
    thankyou Johannes sir for this awesome conceptual video

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

    Thank you. Very particular & clear explanation.

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

    very important subject out of the typical flutter tutorials, outstanding learning material! thanks.

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

      You’re most welcome, Oswaldo Olea! 🙂

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

    You are right, every one should understand this!!!!

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

    That was crystal clear. Thank you very much.

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

    I have My Interview today on flutter ,this helped me thanks!

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

    Amazingly well explained

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

    Very nice explanation

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

    Crystal clear! Thanks man ❤

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

      You are welcome, Abid Hasan!

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

    tk you so much!!! finally a good explanation!!

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

    I just do not think there is anybody who explains flutter so great like this guy, aah why has google not hired you to join their flutter team man😟

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

      Thanks, for your support, Mkhwanazi cebo! 🙂

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

    Excellent explanation!
    The only thing I don't get is: If every widget has its own context, why this whole thing works? I mean in the first example why calling the "Scaffold.of" doesn't work if "Raisedbutton" has its own context? Or even more complex, imagine a "Container" and the "Raisedbutton" inside it. Shouldn't the "Scaffold.of" works since "Container" is above it and has "context"? I know it doesn't but don't know why. Thanks!

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

      Thanks, Samuel! 🙂 We are never using the context of the RaisedButton since we cannot access it and it is inside of the RaisedButton Widget. The main point about BuildContext is that you need to use the BuildContext under the widget that you want to access such as demonstrated at 3:04.
      At 1:40 it is demonstrated why you cannot use the MainPage BuildContext since it is on top of the Scaffold in the widget tree, and therefore you cannot access the Scaffold.

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

    So nicely explained!! 🙏 Keep doing your great work always!! ❤️

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

    Johannes you made my day - Thanks a lot :)

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

    Hi, i love your videos, i learned about context clearly from you.
    Can you please make also a video about state management in the way you explain about context.
    Thank you and more power!

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

      Thank you, SuperChainMan! Check out this video about state management: ua-cam.com/video/l3KnuUmlr-w/v-deo.html&ab_channel=JohannesMilke

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

    do u know that you are the best. thank you for this explanation.

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

    good explaination!

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

    at last I found a good explanation.

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

    Great content. Thanks!!!

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

    Bro you are amazing thank you!!

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

      You’re most welcome, Tobla Mabor! 🙂

  • @MohitKumar-kh6mv
    @MohitKumar-kh6mv 3 роки тому

    Awesome Awesome explanation

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

    Great examples!

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

    thank you man!!subbed.

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

    thank you!

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

    This might help you :)
    Todo App Tutorial: ua-cam.com/video/CQZr-GXe__Y/v-deo.html
    Build A Chat App Tutorial: ua-cam.com/video/wHIcJDQbBFs/v-deo.html
    Social App Design: ua-cam.com/video/PvDOgOdUgkU/v-deo.html
    Tinder Clone UI Tutorial: ua-cam.com/video/v1wofhoutBk/v-deo.html

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

    Perfect, Just Perfect!!!

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

      Thank you, Shikhar Agarwal! 🙂

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

    Nice video and explanation. However … you use opera, that surprised me the most xD. Best of Luck

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

    great video.

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

      Thank you, Suraj Suryawanshi! 🙂

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

    you are the best

  • @sarathkumarg5220
    @sarathkumarg5220 4 місяці тому

    ❤ from India

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

    Thanks bro

  • @eNONO-ot4zh
    @eNONO-ot4zh 3 роки тому

    thank Johannes.
    How to fix "Looking up a deactivated widget's ancestor is unsafe" once forever ?
    thank you in advance

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

    thank for your teach but I have a question is can we name that is the builder function doing as link between the top and buttom

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

      Thank you Scholar Ship! 🙂 The purpose of the Builder is only to supply you with a Build Context. Or what do you mean?

  • @РоманСергеевич-э6ю

    thx! great!

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

      You are welcome, Роман Сергеевич!

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

    How do I get the current context used? I'm triggering overlay notifications from a provider that needs current context in order to display overlay notifications he is managing

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

      Thank You Sara Ttbb! Follow this link: stackoverflow.com/questions/50246019/how-to-get-the-current-context-in-flutter
      I hope you will get your answer 🙂

  • @erfansoltanzadeh-u8x
    @erfansoltanzadeh-u8x Рік тому

    amazing

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

      Thanks, @user-rp7xx7xo2z! 🙂

  • @kavin.kumar2122
    @kavin.kumar2122 3 роки тому

    please make some more bloc videos

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

      Thanks Encyclopedia, sure I can however did you try already Riverpod: ua-cam.com/video/8H3bwxxla4Y/v-deo.html This is a new & trendy state management

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

    so Build is a shortcut to getting a closer context

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

      Thank you, Brendan Chatt! 🙂. You could learn more about flutter architecture here: flutter.dev/docs/resources/architectural-overview

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

    Raised button seems to be deprecated now. So, I used the Elevated button instead. But here is an error with the Snackbar: "The method 'showSnackBar' isn't defined for the type 'ScaffoldState'."
    I tried ScaffoldMessenger.of(context).showSnackBar() and it works, but independently of "builder" exists of not for the scaffold

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

      @@HeyFlutter Thanks a lot!

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

      Thank You Alexey Antonenko! Follow this link: stackoverflow.com/questions/68011487/the-method-showsnackbar-isnt-defined-for-the-type-buildcontext
      I hope you will get your answer 🙂