Kingsley CA
Kingsley CA

Reputation: 11624

How to navigate to a new screen in flutter, while still keeping the bottomNavigationBar

Hy Guys, I'm currently developing an app with Flutter and i'm in the profile Page. I wan't to be able to navigate from the profile page to the settings page without it changing the bottom navigation bar Something Like this

NOTE: The navigation happens within the same tab. I'm not asking for how to switch between tabs

Upvotes: 2

Views: 1374

Answers (1)

Raouf Rahiche
Raouf Rahiche

Reputation: 31356

in the Bottom Navigation Bar the pages are the tabs

and this is a full example

new Scaffold(
      body: new TabBarView(
        children: <Widget>[new FirstTab(), new SecondTab(), new ThirdTab()],
        controller: controller,
      ),
bottomNavigationBar: new TabBar(
          tabs: <Tab>[
            new Tab(
              icon: new Icon(Icons.favorite),
            ),
            new Tab(
              icon: new Icon(Icons.adb),
            ),
            new Tab(
              icon: new Icon(Icons.airport_shuttle),
            ),
          ])

Upvotes: 2

Related Questions