3 Ways to Persist UI State in a Flutter BottomNavigationBar

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

ความคิดเห็น • 60

  • @tobeokoli2368
    @tobeokoli2368 3 ปีที่แล้ว +4

    This was really helpful, the third method is just what I needed. Thanks

    • @fleepgeek
      @fleepgeek  3 ปีที่แล้ว +1

      Nwanne you're welcome.

  • @Ravens-World
    @Ravens-World 3 ปีที่แล้ว +2

    7:42 Third and best method

    • @fleepgeek
      @fleepgeek  3 ปีที่แล้ว

      Good choice.

  • @jesupelumi-a
    @jesupelumi-a 3 ปีที่แล้ว +1

    Thanks a lot man. I had been looking for an efficient way to do this. I saw the IndexedStack approach online and didn't care for it much. The 3rd approach is the way mehn.
    Thanks once again.

    • @fleepgeek
      @fleepgeek  3 ปีที่แล้ว

      No yawa.
      I'm glad you found it useful.

  • @nathantew2180
    @nathantew2180 3 ปีที่แล้ว +1

    Superb video, clear and concise, provides a few options and their pros and cons, and is of course helpful. Love it! Thanks so much!

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      Glad it was helpful!

  • @pepapipi6492
    @pepapipi6492 2 ปีที่แล้ว

    Thanks, the 3rd approach works for me !! 7:44

  • @rijalkhalik9580
    @rijalkhalik9580 2 ปีที่แล้ว

    such a great explanation of the implementation and the scheme !

  • @belveloper
    @belveloper ปีที่แล้ว

    Awesome explanation thank you man 🤝🏻

  • @MohamedSonaTa
    @MohamedSonaTa 2 ปีที่แล้ว

    Thanks Emmanuel you save our time.. Thanks again

  • @KiwiVanderman
    @KiwiVanderman 2 ปีที่แล้ว +2

    Skip to 9.50 for the ability to retain navigation state between tabs. (I had a map view which modally presents a page and needed that page to remain when changing tabs).

  • @developingfire5357
    @developingfire5357 2 ปีที่แล้ว

    Really great video buddy, you break it down really well. 👌

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      Glad you liked it!

  • @frankzheng7925
    @frankzheng7925 4 ปีที่แล้ว +1

    Very practical tutorial..Thanks

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว +1

      Glad you liked it.

  • @RobertCastilloC
    @RobertCastilloC 3 ปีที่แล้ว +1

    Thanks I've been looking for this

    • @fleepgeek
      @fleepgeek  3 ปีที่แล้ว

      Glad I could help

  • @erik_lopez
    @erik_lopez 2 ปีที่แล้ว

    me encanto, me sirvió de mucho, I love it, it helped me a lot

  • @samsonnwokike9897
    @samsonnwokike9897 4 ปีที่แล้ว +1

    Good to see a new video from you

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว +1

      Yeah...I would try to upload new stuffs weekly from now on.
      Is there any topic you'll like to see or any concept you find difficult?

    • @samsonnwokike9897
      @samsonnwokike9897 4 ปีที่แล้ว +1

      @@fleepgeek It would be great to get a series where you build a complete functional flutter app with state management from scratch to completion.

  • @ebubeokocha6554
    @ebubeokocha6554 4 ปีที่แล้ว +1

    Thank you for this man, really helped.

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว

      You're welcome.

  • @tinch014
    @tinch014 2 ปีที่แล้ว

    This was awesome, thank you so much!! 👏👏

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      You're welcome

  • @thomastthai
    @thomastthai 2 ปีที่แล้ว

    You provided an excellent comparison between IndexedStack, PageStorage, and AutomaticKeepAliveClientMixin. How effective is AutomaticKeepAliveClientMixin compared to PageStorage for large projects since AutomaticKeepAliveClientMixin keeps those widgets in memory?

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว +1

      Thanks for asking.
      I go for AutomaticKeepAliveClientMixin based on its simplicity and less boilerplate code as i mentioned in the video.
      I'll have to confirm this but i believe the PageView uses the PageStorage behind the scene to store the scroll offset but it doesn't work here since we're triggering a setState which rebuilds the PageView.
      Plus we also have to maintain the state so that's why using AutomaticKeepAliveClientMixin works better here.
      I haven't done any performance test to compare the two approaches.
      Every approach has its pros and cons and your use-case would differ so choose the one that works best for you :)

  • @harshaldesai5393
    @harshaldesai5393 2 ปีที่แล้ว

    Simply Awesome !!

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      Thanks a lot!

  • @mohamdjamal6266
    @mohamdjamal6266 2 ปีที่แล้ว

    Hi when we need nested navigation, so i case i develop Ecommerce for web and bobile?

  • @3litepker
    @3litepker 4 ปีที่แล้ว +2

    You absolute legend.

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว +2

      Thanks.
      I'm glad you found it helpful.

  • @eNONO-ot4zh
    @eNONO-ot4zh 4 ปีที่แล้ว +1

    I want to give you 1000 👍Like. Thank

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว

      Subscribing would be just enough ;)
      You're welcome

  • @nnamdiemefo6865
    @nnamdiemefo6865 3 ปีที่แล้ว

    Beautiful tutorial. Quick Question: (Using the 3rd Option) If i am on the counter (Home) page and i hit a button that navigates me to another page (Lets call it question page) . If i navigate to the trending page and navigate back to the Home page , will i still be on the Questions Page ?

    • @fleepgeek
      @fleepgeek  3 ปีที่แล้ว

      Welcome to the channel.
      Thanks for the compliment.
      Try it out and give us your feedback.
      We get our hands dirty with codes here.
      #SoroSokeGeneration
      Thanks.

  • @ugandanbasement5020
    @ugandanbasement5020 3 ปีที่แล้ว +1

    Thanks man

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      You're welcome!

  • @thedhirajdiaries
    @thedhirajdiaries 2 ปีที่แล้ว

    Does keep alive mixin work with stateless class as well?

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      A simple Google search would give you this answer faster than my reply.

  • @chichebem
    @chichebem ปีที่แล้ว

    Thank you!!!

  • @GodzillazzZ
    @GodzillazzZ 4 ปีที่แล้ว

    Thank you for great work.. Pls see => AutomaticKeepAliveClientMixin method is not working..

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว

      What exactly is not working?
      Try downloading my code from GitHub and try it out.
      You might be missing something.

  • @jatinhemnani1029
    @jatinhemnani1029 2 ปีที่แล้ว

    PageView() gotta be the best option

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว

      Glad you found the one that works for you :-)

  • @yaqub3567
    @yaqub3567 2 ปีที่แล้ว

    super.build(context) is giving me error.

    • @fleepgeek
      @fleepgeek  2 ปีที่แล้ว +1

      What error?

    • @yaqub3567
      @yaqub3567 2 ปีที่แล้ว

      @@fleepgeek Thanks it was my bad .. I figure out to correct it and it worked

  • @superangel954
    @superangel954 3 ปีที่แล้ว

    THANKS :'D

    • @fleepgeek
      @fleepgeek  3 ปีที่แล้ว

      You're welcome.

  • @lklokesh1634
    @lklokesh1634 ปีที่แล้ว

    tq

  • @calistusiwuoha3162
    @calistusiwuoha3162 4 ปีที่แล้ว

    💪

  • @denisfajar6596
    @denisfajar6596 4 ปีที่แล้ว

    dude, just use state management if u dont want to lose a state of that variable

    • @fleepgeek
      @fleepgeek  4 ปีที่แล้ว +1

      Okay dude.