title: how to hide Bottom Navigation Bar on new screen in flutter?
body: <p>Just like here when I click on the timer, the Bottom navigation bar was disappeared. I want to implement the same thing on flutter. Whenever I click on Bottom Navigation Bar Item, for the new screen the Bottom Navigation Bar should not appear.</p>
  
  <p><a href="https://i.stack.imgur.com/uel8J.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/uel8J.gif" alt="Desired output"></a></p>
  
  <p><strong>Here is my code. My Bottom Navigation Bar has four items and I want to hide the bottom navigation bar when I route to a new screen.</strong></p>
  
  <pre class="lang-dart prettyprint-override"><code>class MyFeedScreen extends StatefulWidget {
       @override
    _MyFeedScreenState createState() =&gt; _MyFeedScreenState();
  }
  
  class _MyFeedScreenState extends State&lt;MyFeedScreen&gt; {
    int _bottomNavIndex = 0;
  
    Widget pageCaller(int index) {
      switch (index) {
        case 0:
          {
            return Category();
          }
        case 1:
          {
            return Feed();
          }
        case 3:
          {
            return Settings();
          }
      }
    }
  
    @override
    Widget build(BuildContext context) {
      SizeConfig().init(context);
      return Scaffold(
        body: pageCaller(_bottomNavIndex),
        bottomNavigationBar: BottomNavigationBar(
          backgroundColor: klogoBlue,
          selectedItemColor: Color(0xfff5f5f5),
          unselectedItemColor: Color(0xfff5f5f5),
          selectedFontSize: 12.0,
          type: BottomNavigationBarType.fixed,
          currentIndex: _bottomNavIndex,
          onTap: (index) {
            setState(() {
              _bottomNavIndex = index;
            });
          },
          items: [
            BottomNavigationBarItem(
              icon: Padding(
                padding:
                    EdgeInsets.only(top: SizeConfig.blockSizeVertical * 0.60),
                child: Icon(Icons.category),
              ),
              title: Padding(
                padding: EdgeInsets.symmetric(
                    vertical: SizeConfig.blockSizeVertical * 0.60),
                child: Text('Category'),
              ),
            ),
            BottomNavigationBarItem(
              icon: Padding(
                padding:
                    EdgeInsets.only(top: SizeConfig.blockSizeVertical * 0.60),
                child: Icon(FontAwesomeIcons.newspaper),
              ),
              title: Padding(
                padding: EdgeInsets.symmetric(
                    vertical: SizeConfig.blockSizeVertical * 0.60),
                child: Text('My Feed'),
              ),
            ),
            BottomNavigationBarItem(
              icon: Padding(
                padding:
                    EdgeInsets.only(top: SizeConfig.blockSizeVertical * 0.60),
                child: Icon(Icons.refresh),
              ),
              title: Padding(
                padding: EdgeInsets.symmetric(
                    vertical: SizeConfig.blockSizeVertical * 0.60),
                child: Text('Refresh'),
              ),
            ),
            BottomNavigationBarItem(
              icon: Padding(
                padding:
                    EdgeInsets.only(top: SizeConfig.blockSizeVertical * 0.60),
                child: Icon(Icons.settings),
              ),
              title: Padding(
                padding: EdgeInsets.symmetric(
                    vertical: SizeConfig.blockSizeVertical * 0.60),
                child: Text('Settings'),
              ),
            ),
          ],
        ),
      );
    }
  }
  
  </code></pre>