How to keep my bottomNavigationBar in subscreens?

40 Views Asked by At

I have a BottomNavigationBar that I use to switch between my main pages in my app, but on one of these screens I have a categories screen where if I select a category I do a Navigator.pushNamed for the selected category. But when I do this, my BottomNavigationBar does not remain because I go to a screen that is outside the children of my PageView. I would like to know how I can keep the BottomBar active.

1

There are 1 best solutions below

0
On

Try using CupertinoTabBar instead of BottomNavigationBar.

From CupertinoTabBar api docs:

Tab changes typically trigger a switch between Navigators, each with its own navigation stack, per standard iOS design. This can be done by using CupertinoTabViews inside each tab builder in CupertinoTabScaffold.