Flutter Provider Tutorial || Mistake that I made as beginner

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • In this video I am going to explain and implement Provider for State Management in Flutter application.
    I will also explain demonstrate how we are calling setState more than often we need. As a beginner we don't really think about the performance but later it creates problem in terms of performance of application.
    ------Git Source:
    github.com/afzalali15/Flutter...
    Provider:
    pub.dev/packages/provider
    Related video:
    Flutter Dark Theme Tutorial | Change Theme Runtime
    • Flutter Dark Theme Tut...
    Other videos:
    Flutter UI Design Tutorial || Soft UI - Skeuomorphism - Neomorphism
    • Flutter UI Design Tuto...
    Flutter UI Design || Adobe XD Soft UI
    • Flutter UI Design || A...
    Flutter UI Design & Development tutorial || Flight Booking UI
    • Flutter UI Design & De...
    Flutter UI Design || Part 2 - Gradient theme
    • Flutter UI Design || P...
    Flutter UI Design || Adobe XD gradient theme
    • Flutter UI Design || A...
    Flutter UI Design & Development || Adobe XD design - 1
    • Flutter UI Design & De...
    Facebook Page: / codexdevs
    Connect with me on social media:
    FB: / user.afzal
    Twitter: / afzalali15
    LinkedIn: / afzalali15

Komentáře • 212

  • @CodeXdev
    @CodeXdev  Před 4 lety +22

    Have you done the same mistake? What was your first application that you made with Flutter :)

    • @deepak5283
      @deepak5283 Před 4 lety

      sir when i have run flutter app in emulator,it runs correctly .when i see a emulator the app size is 97 mb,the app size is large .i have doubt if i use flutter for my project app size it would bigger ,
      how to use flutter to develop big project

    • @prathiv5203
      @prathiv5203 Před 4 lety

      sir im new to flutter can u say the order i should start learning *topics*

    • @siddheshtamhanekar3144
      @siddheshtamhanekar3144 Před 4 lety

      We can create stateful widget which contain only counter and give the timer value this will have the same effect. You will not render whole page but just a text widget.

    • @CodeXdev
      @CodeXdev  Před 4 lety +2

      True, but that is not scalable solution.. each time we need to update something we have to create StatefulWidget.
      But, with provider it's just matter of adding new field. 😊👍

    • @rishadbaniya1679
      @rishadbaniya1679 Před 3 lety

      @@deepak5283 its debug mode🤣

  • @gonzaloencinar4156
    @gonzaloencinar4156 Před 4 lety +26

    First time I understand Provider, thanks for the clear example🙃

  • @juliotati
    @juliotati Před 4 lety +36

    The applause 😂👏🏽👏🏽👏🏽

    • @rakeshkanna91
      @rakeshkanna91 Před 4 lety +6

      Júlio Tati took my headphones off to see who that was. Lol

  • @deliciafernandes9946
    @deliciafernandes9946 Před 4 lety +22

    That coin sound scared me to death!!!

  • @user-or2qz2ws4c
    @user-or2qz2ws4c Před 9 měsíci

    Finally someone who explained Provider Consumer concept clearly

  • @arslankaleem2593
    @arslankaleem2593 Před 3 lety +11

    I was using setstate because it is simple to use. And I was confused that why can't we implement a simple setstate rather than a provider package. Now my concepts are clear about state management. Best explanation so far. You are doing an amazing job.

    • @midnytromeo
      @midnytromeo Před rokem

      This is indeed a best explanation so far about Providers for me.

    • @vukasinsl1
      @vukasinsl1 Před rokem

      cant agree more

  • @ilcarnation3530
    @ilcarnation3530 Před 4 lety +4

    been searching for this topic and non has helped me clearly as yours. such a great tutorial & explanation. I've finally understand it & know how to implement it. thank you so much!

    • @CodeXdev
      @CodeXdev  Před 4 lety

      I am glad that it helped😍

  • @johannesluken949
    @johannesluken949 Před 3 lety

    Great Video! Perfectly explained and definitely the better way to update the UI!

  • @the_offroad_diaries
    @the_offroad_diaries Před 4 lety +2

    This is the easiest way anyone can understand provider , really a great tutorial

  • @georgematua
    @georgematua Před 3 lety

    Great and simple explanation. Thank you!

  • @user-gu5ts5nx8r
    @user-gu5ts5nx8r Před 4 lety +3

    Very clear, understandable and helpful indeed.
    Thank you so much.

  • @vigneshaithal
    @vigneshaithal Před 3 lety

    Great explanation. Was searching for it whole day. Saved my day.

  • @abhishekdiwakar5379
    @abhishekdiwakar5379 Před 3 lety

    Awesome video mate... Thanks for making this video. It really helped me a lot to understand the provider package.

  • @pranthonyaquino
    @pranthonyaquino Před 3 lety +1

    Great explanation, I will avoid this error now! Thanks!

  • @monisankarbarick1622
    @monisankarbarick1622 Před 2 lety

    Best tutorial I have ever seen, thank u

  • @shubhammittal2367
    @shubhammittal2367 Před 3 lety +1

    such a clear explanation of provider thanks a lot

  • @acarvey
    @acarvey Před 3 lety

    Excellent tutorial thank you!

  • @someshsahu4638
    @someshsahu4638 Před rokem +1

    Very nice explanation thankyou so much 🙏🏼🙏🏼🙏🏼

  • @furkan4528
    @furkan4528 Před 2 lety

    That was really nice and clear explanation !

  • @derencewalk
    @derencewalk Před 4 lety

    Thank you for this!

  • @sachinmaharjan11
    @sachinmaharjan11 Před 4 lety +1

    Just easy n clear explanation !!

  • @ahmedseddik2748
    @ahmedseddik2748 Před 3 lety

    Awesome explanation 👏

  • @arunodaykumar1273
    @arunodaykumar1273 Před 3 lety

    i was doing the same mistake...you solved the problem i was solving from days

  • @techtechtuts
    @techtechtuts Před 4 lety +1

    in my opinion when you can achieve something with both type of widget ( stateless and stateful ) then it's preffereable to use Stateless Widget, same concept was in react native as well, but now react native also have api for function based components as well. any ways nice content, only problem is improve your audio quality. my videos also have audio problem thought ;)

  • @Grovermol
    @Grovermol Před 4 lety

    Thanks, the applause kind of suprised me LOL, keep with on this tutorials

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Thanks, More to come! 👍😊

  • @MWStudiooo
    @MWStudiooo Před 4 lety +2

    Best video on provider sir✌️👍

  • @rishavsharma7466
    @rishavsharma7466 Před 2 lety

    THE BEST OUT THERE!

  • @raymondmichael4987
    @raymondmichael4987 Před 3 lety +2

    I'm about to dive into flutter soon, your channel will be of much help.
    Can you talk about reduce build size, as I heard flitter produces very large sized apps.
    Greetings from Tanzania 🇹🇿

  • @averagetekkenplayer8376

    really helpful, thanks.

  • @ronaldsethoga667
    @ronaldsethoga667 Před 2 lety

    I LOVE YOU SO MUCHHH. You have made me a better flutter engineer. Thank you for your amazing content

    • @CodeXdev
      @CodeXdev  Před 2 lety +1

      Thank you so much, welcome onboard :)

  • @abdelrahmanosama1785
    @abdelrahmanosama1785 Před 3 lety

    Great video 👌

  • @M37Shadow
    @M37Shadow Před 3 lety

    I love the way you explain

  • @kwesikennedy3113
    @kwesikennedy3113 Před 4 lety +1

    Great video by all standards. I have a list of data with a filter function that shows only items of th list that contain the search, this means populating or repoulating the list on every typed. Is there a way to use the provider to make this efficient

  • @AliYar-Khan
    @AliYar-Khan Před 3 lety

    Good Explanation !!!

  • @aqeelshamz
    @aqeelshamz Před 3 lety

    Thank youuuu💙

  • @syedashrafquadri6377
    @syedashrafquadri6377 Před 4 lety

    Many thanks sir ji

  • @Imsety
    @Imsety Před 4 lety

    Thank you! This was the first tutorial where I understood the concept.

    • @CodeXdev
      @CodeXdev  Před 4 lety +1

      Glad it was helpful! Like and Subscribe for more useful tutorials in future. 👍😍

    • @prathiv5203
      @prathiv5203 Před 4 lety

      can u say me how long u are learning flutter

    • @Imsety
      @Imsety Před 4 lety

      @@prathiv5203 I started back in May.

    • @prathiv5203
      @prathiv5203 Před 4 lety

      @@Imsety how much u have learnt

    • @prathiv5203
      @prathiv5203 Před 4 lety

      @@Imsety i have just started to learn can u say from were ur reading

  • @manglayadav4022
    @manglayadav4022 Před 4 lety

    Keep it up 👍👍

  • @vukasinsl1
    @vukasinsl1 Před rokem

    provider explained well. most of the guys overcomplicate using some strange word instead of instances and data, notfier and consumer. great.

  • @SatyaPrakash-qd8em
    @SatyaPrakash-qd8em Před 3 lety

    God bless you bro. Best Tutorial on Provider, original documentation really sucks for Beginners.

    • @CodeXdev
      @CodeXdev  Před 3 lety +1

      Thank you.. hope you have seen other videos related to API.

  • @ehtixhamamjad
    @ehtixhamamjad Před rokem

    provider ki best video ha hindi and urdu ma ..thank you so much..

  • @simpleaadmi4736
    @simpleaadmi4736 Před 2 lety

    Couldnt be simpler than this video to understand provider.. 😇

  • @hackerwhite7957
    @hackerwhite7957 Před 4 lety +1

    thanks for your tutorials which is the more best than provider can u suggest me ? thanks in advc

  • @raylin4135
    @raylin4135 Před 3 lety

    wow, your presentation is so easily understandable. Just one question: Why Provider.of inside the initState() has to set the listen parameter to false while in other places this modification is not required?

  • @apeelsubedi844
    @apeelsubedi844 Před 3 lety

    You just got a subscriber

  • @AhmedElsaadany-ey7ri
    @AhmedElsaadany-ey7ri Před 2 lety

    Nice video. Also you can replace that stateful widget with a stateless widget that will be better.

  • @mztanvir
    @mztanvir Před 4 lety

    very helpful...

  • @rsocial453
    @rsocial453 Před 2 lety

    Thank you

  • @IraqAbdullah
    @IraqAbdullah Před rokem

    Very nice

  • @anandmano4375
    @anandmano4375 Před 3 lety +1

    great

  • @fayezalle43
    @fayezalle43 Před 2 lety

    alhamdulillah..thank you...

  • @akshaykaneriya187
    @akshaykaneriya187 Před 3 lety

    please make a video of defferent types of providers and their use, which covers everything about provider. :)

  • @PriyanshuRaj-oc4tk
    @PriyanshuRaj-oc4tk Před 3 lety

    Nice one there🔥👍

  • @francescofreddi4374
    @francescofreddi4374 Před 4 lety

    if i use home: Provider() instead of home: ChangeNotifierProider() in minute 7??? whats change behind the scenes? that i cannot understand!!

  • @AbhiKumar-my2uz
    @AbhiKumar-my2uz Před 4 lety

    loved it!!!.
    bro could you design a complex app using provider

  • @sheelajayakumar6833
    @sheelajayakumar6833 Před 2 lety

    Is it extends or with using modal class ?

  • @devsbuddy
    @devsbuddy Před 3 lety

    Hey can I use this with GetX package because I like the way GetX works but for state management I think provider is best option.

  • @isozar
    @isozar Před 2 lety

    God bless u!!

  • @AliAbdullah-oi3wc
    @AliAbdullah-oi3wc Před 3 lety

    thank you!

  • @imranhossain3511
    @imranhossain3511 Před 5 měsíci

    sir if in my provider i am using multiple information. if I update a single information then it is re rendering all widgets where I have used this provider with consumer. how can I fix this?

  • @Himanshukumar-ix5bd
    @Himanshukumar-ix5bd Před 3 lety

    i have a dout the initS is build only once when the whole class is create and you are define the TimerInfo in initS so that's means the the Timerinfo instance and UpdateReamningtime only once so how the data continuously changes plz clear my dout

  • @sameerk12982
    @sameerk12982 Před 4 lety +1

    Thank you for the helpful tutorial.... One Question > Do we have to use this for timer only or we can use this for updating other widgets? How often and in what other situations we should implement this?

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Hi, Timer is just one of use case. You should use *Provider* for updating data from API, user action, page events and any place where you want to *update part of UI* .

  • @gaganjindal2123
    @gaganjindal2123 Před 4 lety

    nice explanation

  • @shreyagoel8297
    @shreyagoel8297 Před 2 lety

    very helpful

  • @arqamhussain8298
    @arqamhussain8298 Před 3 lety

    why we made listen : false 11:20 , it's difficult for me to grab the concept . Can anyone explain this ? thankyou !

  • @onuryldrm1840
    @onuryldrm1840 Před 3 lety

    Allah razı olsun.

  • @guidoc3518
    @guidoc3518 Před 4 lety

    My provider IS working fine on debut mode. But when i build the app It doesn't work.

  • @mohamedahsan8035
    @mohamedahsan8035 Před rokem

    ❤🎉

  • @access0288
    @access0288 Před 3 lety

    Sir, I cannot import this provider.dart after having installed the package successfully. Any suggestion please ...

  • @amonchowdhury7731
    @amonchowdhury7731 Před 3 lety

    Best

  • @WikkiOnIlluminati
    @WikkiOnIlluminati Před 3 lety

    @9:16 I believe you should have taken timer also inside the model class and should have made interface of the model class something like startTimer and stopTimer or pauseTimer

  • @isozar
    @isozar Před 2 lety

    I have one question, what's the point of setstate since we have to use provider? Where we should use it?

  • @thatsenam9183
    @thatsenam9183 Před 3 lety

    Love From Enam

  • @sushilkhadka8069
    @sushilkhadka8069 Před 2 lety

    Why are you using Stateful Widget where we can easily do the same thing using Stateless widget with provider implemented. Is it necessary to update time inside initState method? Please clear me

  • @2SourceFort
    @2SourceFort Před 3 lety

    observatory listening On*********
    How to solve this problem ??
    Please help me

  • @blackmakerblm92
    @blackmakerblm92 Před 4 lety +1

    I am calling the Provider.of(context) in build function (flutter web ) every time i hover the page the build function is called please how can i solve that

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Calling Provider from build is totally fine, theres something other than this which is causing build to call on hover.. code snippet would help to understand problem. How about posting the issue on FB group or StackOverflow?

    • @blackmakerblm92
      @blackmakerblm92 Před 4 lety

      @@CodeXdev i have comment your post on facebook with a code snippet

  • @olajumokeadenekan8905
    @olajumokeadenekan8905 Před 3 lety +1

    What is your opinion on putting an asynchronous function in initState? I see how you used initState here

    • @CodeXdev
      @CodeXdev  Před 3 lety

      We can invoke async function but we should not wait for it to complete

  • @vijaygovinda719
    @vijaygovinda719 Před 2 lety

    Can you make a video
    getting data from API using Provider...

  • @deepak5283
    @deepak5283 Před 4 lety

    sir when i have run flutter app in emulator,it runs correctly .when i see a emulator the app size is 97 mb,the app size is large .i have doubt if i use flutter for my project app size it would bigger ,
    how to use flutter to develop big project

    • @mhdev4387
      @mhdev4387 Před 3 lety

      you need to use the command : flutter run --release to get the best compiled version of your app

  • @sahilkachhap
    @sahilkachhap Před 3 lety

    Bloc vs Provider which is best and sufficient in case of State management.

    • @CodeXdev
      @CodeXdev  Před 3 lety

      Provider is more like ViewModel and BLoC is based on events and states. If you are more into state management
      then go with BLoC.

  • @ashutoshaswal
    @ashutoshaswal Před 4 lety

    bro I need your help in provider package.
    I am getting a bug.
    I am using two consumer one is returning a text widget and another is returning a listview widget
    my text widget is showing the lenth of the list used by listview.
    Every time I am adding a element in list the text widget listen to changes and update itself but that's not the case with listview.
    I tried to debug this by putting a print statement just before returning listview in consumer and actually that print Statement get invoked but why the listview is not updating then?

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Hey Ashutosh, If you can share your code snippet using DartPad or something that will be helpful. Just make sure, you are using MultiProvider.

  • @1947TamilGamers
    @1947TamilGamers Před 4 lety

    bro use stateBuilder ,that is easy to use and have more docs available to know .

  • @praveenkanwar3261
    @praveenkanwar3261 Před 3 lety

    I am fetching the data from API. but at first I get error receiver null on Consumer and then when the data is loaded the error goes away. How to fix it?

    • @CodeXdev
      @CodeXdev  Před 3 lety

      Your consumer will only call once you notify from your model. Make sure that you are not calling notifyListener before you successfully loaded the data!

  • @bascelik91
    @bascelik91 Před 4 lety

    Maybe I am mistaken and please correct me if I am, but I think that flutter will rerender only variables from setState method, which are assigned to widgets and not whole widget tree.

    • @hyungtaecf
      @hyungtaecf Před 3 lety +1

      It will rerender the widget it was called and all the children widgets that don’t have a const constructor

  • @someorother5272
    @someorother5272 Před 2 lety

    what if we use a seperate widget class for the timer and then call the same in parent......that way your timer will get updated and build will not be called........
    although using provider or value listenable builder will also give the same result

  • @sumitrawat2289
    @sumitrawat2289 Před 2 lety

    Brother plz help !
    I have 2 months left for the completion of my graduation , i know the basics of flutter , api , few sorting algorithms . How can i be job ready as flutter developer in 2 months .?

  • @Sam-ch4jh
    @Sam-ch4jh Před 4 lety

    thank you. So, "setState" will reload whole page but now only the build method runs, because of the notifier.
    The code completion was working earlier for in Android Studio, now does not work, I was having too many plug-in, now not sure which plug in it was. Could you please get me link.

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Did you mean provider package link? Here it is: pub.dev/packages/provider
      Code completion has nothing to do with these packages, may be try running flutter doctor.

    • @Sam-ch4jh
      @Sam-ch4jh Před 4 lety

      @@CodeXdev
      Sorry, there must be some other issue, code completion does not work for me
      Will check

  • @naingtheawperc3817
    @naingtheawperc3817 Před 3 lety

    What is the purpose of getter in TimerInfo class?
    Can you explain me more about getter you created ?

    • @CodeXdev
      @CodeXdev  Před 3 lety

      Nice question! _remainingTime is Private variable, Its good practice to create getter setter to access fields. Hope that helps 👍

  • @devgabriel6898
    @devgabriel6898 Před 4 lety

    Is your macbook hot as hell with the build and the emulator running? Mine gets to 80c quite easy.

    • @CodeXdev
      @CodeXdev  Před 4 lety +1

      Only when I put it on bed 😂, otherwise 16 gigs of RAM keep me going👍🏼

    • @devgabriel6898
      @devgabriel6898 Před 4 lety

      CodeX yeah I have 16 too but temperature raise a lot with emulator

    • @CodeXdev
      @CodeXdev  Před 4 lety +1

      I can understand how it feel, I started using VS Code instead of Android Studio... and i make sure everything is closed when emulator n VS is fired! Try using cooling pad, sometime surface also can cause heat..

  • @arshadkhanSherani
    @arshadkhanSherani Před 3 lety

    Thank you for the helpful tutorial. Sir, I working on a comments page like Facebook. I have a list of posts using ListView.builder. I have a new screen for comments whenever a user comments on the post then I want to increment the comment on the listing page. I'm stuck on this. how can I do this? I'm using Flutter Provider. Thanks

    • @Abhishvek
      @Abhishvek Před 3 lety +1

      I suggest you to watch this video czcams.com/video/hRStAmkTcJY/video.html might help you😁

  • @dhananjaygavali8266
    @dhananjaygavali8266 Před 3 lety

    hey nice video. But I didn't understand where do you set value for timer to 60.

    • @CodeXdev
      @CodeXdev  Před 3 lety +1

      I highlighted with graphics, that timer initialisation got edited due to flow of video.. it should be in Controller.

  • @ajaykotiyal427
    @ajaykotiyal427 Před 3 lety

    Thanks for sharing. What is "Real Quick"??

    • @CodeXdev
      @CodeXdev  Před 3 lety +1

      🤣🤣 Really Quick 😅

  • @yakoubtarkaoui2586
    @yakoubtarkaoui2586 Před 4 lety

    thank you, sir, for this tutorial
    can you tell me what's your laptop version

    • @CodeXdev
      @CodeXdev  Před 4 lety +1

      macOS Catalina Version 10.15.3, is that what you needed?

    • @abbas_tfu
      @abbas_tfu Před 4 lety +1

      @@CodeXdev 😂

    • @yakoubtarkaoui2586
      @yakoubtarkaoui2586 Před 4 lety

      @@CodeXdev yeah thank you
      I ask for I will buy one
      thank you again 😀

  • @prsh1989
    @prsh1989 Před 3 lety +1

    3:02 Hey Afzal, I know setstate calls build method, and whatever is inside build method is thus rendered again, but if we are calling setstate on a single variable only, then why setstate is not analyzing this fact and only re-rendering that particular variable rather than entire build method? I mean, considering how smart flutter framework is at some place, then how come setstate could not figure out only which part to re-render rather than entire build method (I am taking reference from react where it makes a virtual dom and compare it with actual dom and make changes to only those components which are changed)
    Edit: Please note that I have watched the entire video, and I know for this provider is introduced. However, I am curious to know as in why setstate couldn't figure this aspect about which I am talking (intelligent rebuild) .

    • @someorother5272
      @someorother5272 Před 2 lety

      i think even though build is called the entire screen is not rendered.......its only the portion that is connected to the variable is rendered......need to check it in android studio performance monitor

    • @CodeXdev
      @CodeXdev  Před 2 lety

      So, at the bottom level.. its not repainting the widgets which dont have any change, but yes.. it goes through comparison of widgets and the one whose state has changed is repainted! Overall its not super efficient, but doesn’t even do repaint either.

    • @someorother5272
      @someorother5272 Před 2 lety

      yeah provider would do alot of good in speeding things up

  • @hammadtariq9324
    @hammadtariq9324 Před 2 lety

    Hey, I am new to mobile app development. What do you prefer, getx or provider?

    • @CodeXdev
      @CodeXdev  Před 2 lety

      I prefer GetX over provider

    • @Ayan-od8hk
      @Ayan-od8hk Před rokem

      I would choose bloc over both. It's late, but what did you choose?

  • @rede_neural
    @rede_neural Před rokem

    Why flutter didn't created a function like setState(this)? Wouldn't be possible?

  • @TheMr82k
    @TheMr82k Před 4 lety +1

    Some points I want to mention, if you have a big widget tree inside the consumer they all will rebuild. But here is the important part that most people don't realize Flutter rebuilding itself doesn't mean it's creating new copies it just checks for changes with its own element tree and only rebuilds new instances of the changed widget.

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Rightly said, but that comparison for each element takes execution time. We have third parameter in builder of Consumer that holds the child widget (without rebuild), I haven't covered in this tutorial but if needed I will sure explain how that works.

    • @TheMr82k
      @TheMr82k Před 4 lety +1

      @@CodeXdev you can't ignore that. That's how state change happens. The Consumer you used has its build method read the source go there and the print command. It will print you that over and over again every time there is a change in the counter. Also, this isn't how you show people if something is rebuilding or not there is Dart observatory which has a tool that shows the UI that has been rebuild. You need to learn more before making tutorials with incomplete knowledge dude.

    • @CodeXdev
      @CodeXdev  Před 4 lety +1

      Appreciate your feedback.

    • @ronaldsethoga667
      @ronaldsethoga667 Před 2 lety +1

      @@TheMr82k Out of all the amazing content this man chose to teach us, you just decided to choose a few mistakes and hate all over him? Come on man there are nicer ways of offering alternative solutions and yours isn't it. And in fact this video was very simplified for everyone to understand the basic concepts of Provider, so you can stay at the corner with your big brain while all of us learn from this amazing flutter expert

  • @majestyclub8170
    @majestyclub8170 Před 3 lety

    Where did he initialise timer to 60?😅i cant found it

  • @ulrotha
    @ulrotha Před 4 lety

    Can you prevent rebuild widget after Navigator.push() or .Pop()?
    Thanks advance

    • @CodeXdev
      @CodeXdev  Před 4 lety

      That's simple. Just cancel the timer.. you will have to create State level timer and cancel() from somewhere before navigating or on dispose(). Does that answer your question?

    • @ulrotha
      @ulrotha Před 4 lety

      Eg. I have two screens. A and B. A navigate to B. When I back to screen A. Screen A always rebuild root widget. Could you prevent rebuild widget?

    • @CodeXdev
      @CodeXdev  Před 4 lety

      Thats the lifecycle of the State, preventing that will have its own consequences. Still, i will appreciate if anyone has answer to that..

    • @ulrotha
      @ulrotha Před 4 lety

      @@CodeXdev thanks

    • @cryonim
      @cryonim Před 4 lety +1

      @@CodeXdev stackoverflow.com/questions/49439047/how-to-preserve-widget-states-in-flutter-when-navigating-using-bottomnavigation

  • @SergioArroyoSailing
    @SergioArroyoSailing Před 3 lety +1

    great content man, but I can hardly hear you. Can you please increase the volume? ( I know it's not me 'coz the ads are too loud )

    • @CodeXdev
      @CodeXdev  Před 3 lety

      Thanks for feedback, improving day by day 😀I cannot modify this video, but in my latest videos you will find much better audio 😍czcams.com/video/4RHvFVVUWqw/video.html