Need a persistent/same Bottom Navigation Bar for all screens - Flutter

前端 未结 9 1110
不思量自难忘°
不思量自难忘° 2021-02-01 21:50

I am a beginner with flutter and dart. I have been trying to implement a navigationBar on three different pages in my app. The toggling works well for an individual

9条回答
  •  一生所求
    2021-02-01 22:14

    Another great solution is the persistent_bottom_nav_bar package provided by Bilal Shahid.

    It is easy to use and offers you a bunch of features:

    • Highly customizable persistent bottom navigation bar.
    • Ability to push new screens with or without bottom navigation bar.
    • 20 styles for the bottom navigation bar.
    • Includes functions for pushing screen with or without the bottom navigation bar i.e. pushNewScreen() and pushNewScreenWithRouteSettings().
    • Based on flutter's Cupertino(iOS) bottom navigation bar.
    • Can be translucent for a particular tab.
    • Custom styling for the navigation bar. Click here for more information. Handles hardware/software Android back button.

    Before I found this package I followed the solution from the article @Abin mentioned in his answer. But I ran into the problem, that all screens from the navbar beeing loaded on first load of the navbar which is not that perfomant. I did not mangaed to solve this, but luckily Bilal Shahid provide a good solution with his package.

    All credits to him.

提交回复
热议问题