1

I'm creating my first app in flutter, and i'm having issues with state management. I have a MainPage.dart with BottomNavigationBar, and body: with tabPages[MainTab, ...]. In the MainTab i have a ListView, and when i click ListView item, it should open details, however BottomNavigationBar shouldn't be removed. Below i have a design.(I'm using Scoped Model).

enter image description here

I tried these solutions https://gist.github.com/HansMuller/0e76c54b1f2d4423efbdc2c185e761ef and How to route to page, without removing BottomNavigationBar in flutter?

But in those cases, i can't route to page without bottom navigation. When i click on FLoatingActionButton: it should open new page without bottom navigation (BottomNavigationBar stay always at the bottom, even if i don't want it)

Данияр
  • 91
  • 1
  • 10
  • You can use a nested `Navigator` to achieve this workflow. Look at something like the code for `CupertinoTabScaffold` (which uses a nested `Navigator` internally) or this post: https://stackoverflow.com/questions/55213680/in-a-nested-navigator-structure-of-flutter-how-do-you-get-the-a-specific-naviga – John Dengis Jun 12 '19 at 16:53
  • I need materialApp (So i can't use cupertinoTab). Now i tried solution with Navigator, but now i can't route to page without bottom navigation (In some cases i don't need bottomNavigationBar). – Данияр Jun 20 '19 at 09:56
  • https://medium.com/@daniyargilimov/lutter-bottomnavigationbar-with-multiple-navigators-725ff013489c – Данияр Jun 22 '19 at 10:30

1 Answers1

1

https://medium.com/@daniyargilimov/lutter-bottomnavigationbar-with-multiple-navigators-725ff013489c

here is the working example...

Данияр
  • 91
  • 1
  • 10