8

I'm running the Flutter Gallery example from Google:

https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart

In the gif below, notice how when I navigate from one screen to the next, the Cupertino Tab Bar stays at the bottom of the screen. The reason why this is the case is that it is a widget that lays within the parent widget CupertinoNavigationDemo and while the tabs are swapped in and out of the view, the tab bar remains.

Is there a way to get rid of the Tab Bar when navigating?

enter image description here

Simon
  • 19,658
  • 27
  • 149
  • 217
  • Have you tried just using Navigator.push and creating new Scaffold without TabBar in a new route – Tree May 19 '18 at 01:23

1 Answers1

22

set rootNavigator: true

Navigator.of(context, rootNavigator: true).push(MaterialPageRoute(
      builder: (context) => "your new routes",
    ));
paynestrike
  • 4,348
  • 14
  • 46
  • 70