title: TabBarView and BottomNavigationBar to control what displays at body of Scaffold
body: <p>I can't have both <strong>TabBarView</strong> and <strong>BottomNavigationBar</strong> control what displays at the body of my Scaffold. With this code, either TabBarView has control or BottomNavigationBar.</p>
  
  <p>I want to be able to scroll sideways between ALL FOUR pages as well as pick HOME and FAVORITES to control what displays on the screen.</p>
  
  <pre><code>@override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("Traveler"),
        bottom: new TabBar(controller: controller, tabs: &lt;Tab&gt;[
          new Tab(text: "NEW"),
          new Tab(text: "HOTELS"),
          new Tab(text: "FOOD"),
          new Tab(text: "FUN"),
        ]),
      ),
      body: new Stack(
        children: &lt;Widget&gt;[
          new Offstage(
            offstage: index != 0,
            child: new TickerMode(
              enabled: index == 0,
              child: new Material(child: new NewPage()),
            ),
          ),
          new Offstage(
            offstage: index != 1,
            child: new TickerMode(
              enabled: index == 1,
              child: new Material(child: new HotelsPage()),
            ),
          ),
          new TabBarView(controller: controller, children: &lt;Widget&gt;[
            new NewPage(),
            new HotelsPage(),
            new FoodPage(),
            new FunPage(),
          ]),
        ],
      ),
      bottomNavigationBar: new BottomNavigationBar(
          currentIndex: index,
          onTap: (int index) {
            setState(() {
              this.index = index;
            });
          },
          items: &lt;BottomNavigationBarItem&gt;[
            new BottomNavigationBarItem(
              icon: new Icon(Icons.home),
              title: new Text("Home"),
            ),
            new BottomNavigationBarItem(
              icon: new Icon(Icons.favorite),
              title: new Text("Favorites"),
            ),
          ]),
    );
  }
  </code></pre>