nested-navigation-demo-flutter icon indicating copy to clipboard operation
nested-navigation-demo-flutter copied to clipboard

Remove Bottom Navigation Bar on certain routes/pages

Open mfenz opened this issue 5 years ago • 5 comments

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!

mfenz avatar Apr 29 '20 07:04 mfenz

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);

AtamyratBabayev avatar Aug 07 '20 11:08 AtamyratBabayev

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.

Ali-hd avatar Sep 22 '20 10:09 Ali-hd

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

AtamyratBabayev avatar Sep 23 '20 06:09 AtamyratBabayev

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.

Ali-hd avatar Sep 23 '20 10:09 Ali-hd

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).

AtamyratBabayev avatar Sep 23 '20 11:09 AtamyratBabayev