title: Why is the BottomNavigationBar disappearing?
body: <p>I am having a problem with a <code>BottomNavigationBar</code> in my Flutter App using the Bloc Architecture. When clicking on a Menu-Item the Bar disappears. To switch between the different pages, I am using the <code>Navigator</code> API.</p>
  <p>This is the Root Page containing the <code>BottomNavigationBar</code>. Do you guys have any idea?</p>
  <pre><code>class RootPage extends StatelessWidget {
    RootPage({Key? key}) : super(key: key);
  
    static const String routeName = '/root';
  
    static Route route() {
      return MaterialPageRoute(
          settings: const RouteSettings(name: routeName),
          builder: (context) =&gt; RootPage());
    }
  
    @override
    Widget build(BuildContext context) {
      return SafeArea(
          child: Scaffold(bottomNavigationBar:
              BlocBuilder&lt;NavigationBarCubit, NavigationBarState&gt;(
        builder: (context, state) {
          return BottomNavigationBar(
            currentIndex: state.index,
            showUnselectedLabels: false,
            items: [
              BottomNavigationBarItem(
                icon: Icon(
                  Icons.group,
                ),
                label: 'Sessions',
              ),
              BottomNavigationBarItem(
                icon: Icon(
                  Icons.search,
                ),
                label: 'Search',
              ),
              BottomNavigationBarItem(
                icon: Icon(Icons.music_note_sharp),
                label: 'Playlists',
              ),
            ],
            onTap: (index) {
              if (index == 0) {
                BlocProvider.of&lt;NavigationBarCubit&gt;(context)
                    .getNavBarItem(NavBarItem.sessions);
              } else if (index == 1) {
                BlocProvider.of&lt;NavigationBarCubit&gt;(context)
                    .getNavBarItem(NavBarItem.search);
              } else if (index == 2) {
                BlocProvider.of&lt;NavigationBarCubit&gt;(context)
                    .getNavBarItem(NavBarItem.playlists);
              }
            },
          );
        },
      ), body: BlocBuilder&lt;NavigationBarCubit, NavigationBarState&gt;(
        builder: (context, state) {
          WidgetsBinding.instance.addPostFrameCallback((_) {
            if (state.navBarItem == NavBarItem.sessions) {
              Navigator.push(context, SessionsPage.route());
            } else if (state.navBarItem == NavBarItem.search) {
              Navigator.push(context, SearchPage.route());
            } else if (state.navBarItem == NavBarItem.playlists) {
              Navigator.push(context, PlaylistPage.route());
            }
          });
          return Container();
        },
      )));
    }
  }
  </code></pre>