title: Navigation within Tab view body Flutter
body: <p>The app contains TabBar as well as BottomNavigationBar.
  When I tried to navigate within the body of tab bar view it navigates full screen.</p>
  <p>This is the result I am trying to get when clicked on button-
  <a href="https://i.stack.imgur.com/qUNyG.png" rel="nofollow noreferrer">Expected Result</a></p>
  <p>But I am getting this
  <a href="https://i.stack.imgur.com/olRH4.png" rel="nofollow noreferrer">Current Output</a></p>
  <p>Here I have attached the code-</p>
  <pre><code> Widget build(BuildContext context) {
          return new Scaffold(
            appBar: new AppBar(
              title: new Text(&quot;Traveler&quot;),
              bottom: new TabBar(controller: _controller, tabs: &lt;Tab&gt;[
                new Tab(text: &quot;NEW&quot;),
                new Tab(text: &quot;HOTELS&quot;),
                new Tab(text: &quot;FOOD&quot;),
                new Tab(text: &quot;FUN&quot;),
              ]),
            ),
            body: new TabBarView(
              controller: _controller,
              children: &lt;Widget&gt;[
                new NewPage(_index),
                new HotelsPage(_index),
                new FoodPage(_index),
                new FunPage(_index),
              ],
            ),
            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(&quot;Home&quot;),
                  ),
                  new BottomNavigationBarItem(
                    icon: new Icon(Icons.favorite),
                    title: new Text(&quot;Favorites&quot;),
                  ),
                ]),
          );
        }
      }
      
      class NewPage extends StatelessWidget {
        final int index;
      
        NewPage(this.index);
      
        @override
        Widget build(BuildContext context) {
          return new Center(
            child: RaisedButton(
              onPressed: (){
                 Navigator.push(context,MaterialPageRoute(builder: (context)=&gt;InsideTabViewPage()), );
              },
              child: new Text('NewPage, index: $index')),
          );
        }
      }
      
     
  </code></pre>