Flutter: Keep BottomNavigationBar When Push to New Screen with Navigator

后端 未结 10 727
情深已故
情深已故 2020-12-25 12:55

In iOS, we have a UITabBarController which stays permanently at the bottom of the screen when we push to a new ViewController.

In Flutter, we have a bottomNavigation

10条回答
  •  悲&欢浪女
    2020-12-25 13:42

    You could actually place a placeholder inside body so the structure like this

    - AppBar
    - body (dynamic content from placeholder)
    - BottomNavigationBar
    

    Then you would have another class as a placeholder So each time you tap on the BottomNavigationBar it will refresh content of the body

    One example I found is here https://willowtreeapps.com/ideas/how-to-use-flutter-to-build-an-app-with-bottom-navigation

    and here but a litte too complex and not working for me https://medium.com/@swav.kulinski/flutter-navigating-off-the-charts-e118562a36a5

    and this https://medium.com/coding-with-flutter/flutter-case-study-multiple-navigators-with-bottomnavigationbar-90eb6caa6dbf

提交回复
热议问题