bizz84 / nested-navigation-demo-flutter

Nested navigation with BottomNavigationBar
https://codewithandrea.com/
MIT License
616 stars 139 forks source link

Remove Bottom Navigation Bar on certain routes/pages #11

Open mfenz opened 4 years ago

mfenz commented 4 years ago

Hi! Thank you for the great plugin.

Is it possible to remove the bottom navigation on certain pages? i.e. I want to open some fullscreen pages without the bottom navigation bar and return to pages with the bottom navigation bar once the fullscreen page finished (like Android's startActivityForResult).

Thank you!

AtamyratBabayev commented 4 years ago

Hello))

I think, you don't need to remove it) Actually you could use the first level navigator, by using Navigator.of(context, rootNavigator: true);

Ali-hd commented 4 years ago

Hello))

I think, you don't need to remove it) Actually you could use the first level navigator, by using Navigator.of(context).push(..);

Hi, I'm facing the same problem and I don't understand your answer. I'm trying to create a full screen page ontop of the bottom nav bar. I tried Navigator.of(context).push(new route) but it doesn't work.

AtamyratBabayev commented 4 years ago

Sorry, I've just updated my answer! So, what I mean by using first navigator:

SplashScreen(no bottom navBar) -> MainScreen(with app bar);

MainScreen screens:

HomeScreen -> ProductScreen -> etc.

ProfileScreen -> Navigator.of(context, rootNavigator: true); -> Login screen(no bottom navBar)

Is that ok? More info: https://stackoverflow.com/a/55218112/10084055

Ali-hd commented 4 years ago

Sorry, I've just updated my answer! So, what I mean by using first navigator:

SplashScreen(no bottom navBar) -> MainScreen(with app bar);

MainScreen screens:

HomeScreen -> ProductScreen -> etc.

ProfileScreen -> Navigator.of(context, rootNavigator: true); -> Login screen(no bottom navBar)

Is that ok? More info: https://stackoverflow.com/a/55218112/10084055

Thanks!! Its working just by adding rootnavigator: true.

AtamyratBabayev commented 4 years ago

This solution works only with 2 level navigation (root, custom). But I don't know how to access to the middle navigator for 3 or more level navigations(root, middle, custom).