Flutter Quick Tip: Using the "mounted" property | Flutter Developers must Know

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • #flutter #mounted #setstate
    In this Flutter Quick Tip Tutorial, we are going to take a look at using the "mounted" property which is absolutely essential to know for Flutter Developers. This can help you to prevent a lot of memory leaks in your Flutter Mobile Apps and help you solve the error such as setState called after dispose.
    👉 Flutter Docs: api.flutter.de...
    🔥 Auto-Generate Flutter Custom Paint Code TRY THIS FREE TOOL👇:
    👉 Flutter Shape Maker: fluttershapema...
    🔥 Learn About the Most Important Widgets in Flutter 👇:
    👉 Widget Essentials Series: bit.ly/3GpfiYw
    👉🏻 Product Hunt: www.producthun...
    (Your UPVOTE Means a lot! 🙌)
    If you find this video useful consider Supporting @RetroPortal Studio :
    👉 Buy Me a Coffee: www.buymeacoff...
    👉 Patreon: / retroportalstudio
    Social Links @RetroPortal Studio :
    👉 Twitter: / theretroportal
    👉 Medium: / retroportalstudio
    👉 Instagram: / retroportalstudio
    👉 Patreon: / retroportalstudio
    👉 GitHub: github.com/ret...
    If you like the tutorial, please hit the LIKE and Subscribe button and also consider supporting me on Patreon or Buy Me a Coffee for More Flutter Tutorial on RetroPortal Studio.
    Thank you for Watching! Happy Coding :)

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

  • @sharbelokzan9673
    @sharbelokzan9673 2 года назад +24

    Those type of short videos adressing simple yet very common probelms are the most useful videos for developers, thank you

  • @jeancarlosquejadatoro3939
    @jeancarlosquejadatoro3939 2 года назад +11

    Wooo I didn't know the override solution I always wrap setState into the condition , thanks so much man... Amazing explanation! 😍😍😍

  • @nateg617
    @nateg617 5 месяцев назад +1

    Fantastic. Easy and clear. Thanks !

  • @Amandeep-kq5bz
    @Amandeep-kq5bz 2 года назад +5

    Perfect Explanation.

  • @riyadhalankoa3100
    @riyadhalankoa3100 2 года назад +3

    one of the best channels , straight through , great topics , pure linear knowledge ... keep it up you are doing great

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

    Freaking Matrix. I saw your video yesterday and today I got this error for the first time!!! Awesome. Thanks man

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

    Short, clear and very useful ! Perfect one here 👌

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

    Thank you so much, I've been getting this error for 2 days

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

    wow. Thank you. the for overriding setstate() was amazing closing note.

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

    Thank you very much :D

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

    You should create more of such content!

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

    Short, clear and very useful ! Perfect one here

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

    Well explained

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

    Thanks for this amazing video, really a neat trick to override the setState, never knew that was possible.

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

    Learnt something useful today thanks.

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

    I glad I've met you

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

    Terimakasih Sharing videonya sangat bermanfaat salam sukses dan sehat selalu ya

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

    thank you so much

  • @user-jchjkitv77896
    @user-jchjkitv77896 2 года назад +1

    I always got this error 😃. Very helpful.

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

    Very good and well explained. Thanks.

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

    To the point Solutions, Excellent work !!

  • @rahuljamba5846
    @rahuljamba5846 5 месяцев назад +1

    Great topics

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

    thanks!! useful and short.. like a shot of knowledge..in the middle of the brain hahaha

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

    Very useful

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

    Perfect as usual bro...thank you

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

    thank you, great tip!

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

    Thanks

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

    I love your channel 💓

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

    Thank you so much bro for this❤❤

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

    Wonderful. Thank you for this helpful tip

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

    Thanks for the info!

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

    Thanks!

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

    Cool trick ! Thanks :)

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

    Just what i needed :)

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

    In this case, do we need to override within each class?
    Is there any way we can set it globally?

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

    How would you cancel the api call instead in dispose /destroy method ??

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

    Great trick Thanks.

  • @acornerofherheart-jr9pl
    @acornerofherheart-jr9pl 3 месяца назад

    thank you

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

    Great Info.

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

    Super Information .👌👌👌

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

    Bro Please restart making a new video. Your content is so good what flutter developer should to learn. Please make video on state management(Bloc, GetX, Provider....) on real life related project. And please comeback and make a video😪😪

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

    Great tip! I didn’t know about this property

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

      I think we should add it on baseview widget of MVVM provider architecture when setting viewstate to busy or idle

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

      @@markdioneeb8997 We can add it but not for idle and busy. won't work for that

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

      @@FilledStacks noted, btw I thoroughly studied your awesome mvvm architecture the provider + getit version and still sticking to it even if there's already stacked package, I was overwhelmed with all the features I hope u can provide a working example of every feature of the package, a simple counter would be very helpful. Thank you.

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

      @@markdioneeb8997 Hey, i built 2 series of howto use stacked. it's exactly the same, and on the readme there's an example :)

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

    So much helpfull 👏🙌

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

    why is not the defailt in flutter?

  • @barnabassolomon1629
    @barnabassolomon1629 4 месяца назад

    never encountered this when i used bloc, im curious why

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

    👍

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

    Hallo Mr, i'm Roberto from jakarta,
    I am still a beginner who just wants to learn to be an Android application developer.
    I'm still confused. For example, if you make an Indonesian versus English dictionary application and other languages, or make a holy book, are the vocabulary lists or long verses written under the coding, like during UI design, or are they called from a special repository? because if a list of vocabulary words or a large number of verses from the holy book are inserted per sentence under the text wedges, it definitely requires a lot of page space.
    Can you please give a basic example of making a language dictionary or holy book application?
    I've been looking for it for a long time in the Indonesian Flutter programmer tutorial but haven't found a video that specifically explains my question.

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

    Why google developers did not add it in setState function default?

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

    How to Check mounted in StatefulBuilder

  • @hi-s
    @hi-s 2 года назад +2

    I knew it from andrea course animation master class

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

    im facing same issue in statefulbuilder check for mounted variable as described in video is not working in statefulbuilder kindly make a video to solve same problem inside statefulbuilder

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

    Hello, can i use some library to edit my image(grayscale, split text in image) after i import it from ImagePicker library

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

    why u r not uploading sir

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

    recently i saw it

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

    why dont flutter make it a default behavior of setState?

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

    Where is the code

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

    Why did you stop making videos?

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

    Hm, but why mounted isn't by default as wrapper of setState instead of overriding that?

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

    Why it's not the default behavior?

  • @kalyanchandra4376
    @kalyanchandra4376 2 месяца назад

    Finally U didn't explain the what the exact mounted keyword will does?

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

    Hello bro plz upload a sales end 24 hours live timer video tutorials eg: Amazon, flipkart sales end time . Sales end time No video available in RUclips ..

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

    using a proper state management library, It prevents this error .... never encountered,this is because a state management library like provider, bloc etc decouples the UI and is always disposed properly

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

      I use provider and never had to handle such an issue. Seems weird having to repeat code and handle set state like that in every screen

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

    Bhai flutter shape maker flutter web hai fir bhi fast load ho jata hai or mera flutter web project me release me bhi white screen aata hai initially 5-6 seconds.
    How to fix ?

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

    my 1 Million Dollar question is how to check for if mounted when using stateless widget with any state management like GetX or provider

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

    Very ba you left making video just for some money you are getting think about future generations students very bad .
    Kindly spare some time : future students will came to know easily this tech stack
    Why I'm saying to you is you are good enough in this