Flutter: Keep BottomNavigationBar When Push to New Screen with Navigator

后端 未结 10 758
情深已故
情深已故 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:45

    You can create Navigator widget in a Stack widget to use BottomNavigationBar with tabs' inner navigation. You can use WillPopScope to handle Android's back button to pop inner screens of tab. Also, double tap bottom navigation item to pop all inner screens of a tab.

    I've created a Sample app for this.

    Hope this help!

提交回复
热议问题