title: Flutter drawer with bottom navigator tabs
body: <p>I'm still a beginner at flutter and I want to create a flutter mobile app with a side drawer and a bottom navigation tab bar. I have created my app with a side drawer and a bottom navigation, but my problem is I want to open the Home page from both drawer and bottom navigation tab.</p>
  <p>Now the drawer is opening the home page but it's not showing the bottom navigator.</p>
  <p>here's my code</p>
  <p>main.dart</p>
  <pre><code>import 'package:discover_me/screens/home.dart';
  import 'package:discover_me/screens/search.dart';
  import 'package:discover_me/tabs/tabspage.dart';
  import 'package:flutter/material.dart';
  
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        theme: ThemeData(
          scaffoldBackgroundColor: Colors.white,
          primaryColor: Colors.white
        ),
        home: TabsPage(),
        debugShowCheckedModeBanner: false,
        routes: {
          // '/': (context) =&gt; Home(),
          '/home': (context) =&gt; Home(),
          '/search': (context) =&gt; SearchPage(),
        },
      );
    }
  }
  </code></pre>
  <p>tabspage.dart</p>
  <pre><code>import 'package:discover_me/shared/bottom_tabs.dart';
  import 'package:flutter/material.dart';
  
  class TabsPage extends StatefulWidget {
    @override
    _TabsPageState createState() =&gt; _TabsPageState();
  }
  
  class _TabsPageState extends State&lt;TabsPage&gt; {
    int _selectedIndex = 0;
    static const TextStyle optionStyle =
        TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
  
  
    void _onItemTapped(int index) {
      setState(() {
        _selectedIndex = index;
      });
    }
  
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: Scaffold(
          body: IndexedStack(
          index: _selectedIndex,
          children: [
            for (final tabItem in TabNavigationItem.items) tabItem.page,
          ],
        ),
        // drawer: SideMenu(),
        ),
        bottomNavigationBar: BottomNavigationBar(
          items: const &lt;BottomNavigationBarItem&gt;[
            BottomNavigationBarItem(
              icon: Icon(Icons.home),
              title: Text('Home'),
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.business),
              title: Text('Business'),
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.school),
              title: Text('School'),
            ),
          ],
          currentIndex: _selectedIndex,
          selectedItemColor: Colors.amber[800],
          onTap: _onItemTapped,
        ),
      );
    }
  }
  </code></pre>
  <p>bottom_tabs.dart</p>
  <pre><code>import 'package:discover_me/screens/home.dart';
  import 'package:discover_me/screens/search.dart';
  import 'package:flutter/material.dart';
  import 'package:flutter/widgets.dart';
  
  class TabNavigationItem {
    final Widget page;
    final Widget title;
    final Icon icon;
  
    TabNavigationItem({this.page, this.title, this.icon});
  
  static List&lt;TabNavigationItem&gt; get items =&gt; [
          TabNavigationItem(
            page: Home(),
            icon: Icon(Icons.home),
            title: Text(&quot;Home&quot;),
          ),
          TabNavigationItem(
            page: SearchPage(),
            icon: Icon(Icons.home),
            title: Text(&quot;Home&quot;),
          ),
          TabNavigationItem(
            page: Home(),
            icon: Icon(Icons.home),
            title: Text(&quot;Home&quot;),
          ),
        ];
  
  
  }
  </code></pre>
  <p>home.dart</p>
  <pre><code>import 'package:discover_me/jsn_objects/visit_places.dart';
  import 'package:discover_me/tabs/tabspage.dart';
  import 'package:discover_me/widgets/side_menu.dart';
  import 'package:flutter/material.dart';
  import 'dart:convert';
  
  class Home extends StatefulWidget {
    @override
    _HomeState createState() =&gt; _HomeState();
  }
  
  class _HomeState extends State&lt;Home&gt; {
    bool expanded = false;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        
        drawer: SideMenu(),
        appBar: AppBar(
          leading: Builder(
            builder: (BuildContext context) {
              return RotatedBox(
                quarterTurns: 1,
                child: IconButton(
                  icon: Icon(
                    Icons.bar_chart_rounded,
                    color: Colors.black,
                  ),
                  onPressed: () =&gt; Scaffold.of(context).openDrawer(),
                ),
              );
            },
          ),
          backgroundColor: Colors.white,
          elevation: 0.0,
          actions: [
            IconButton(
                color: Colors.black,
                icon: Icon(Icons.search),
                onPressed: () {
                  Navigator.pushNamed(
                    context, '/search'
                  );
                }),
          ],
        ),
        body: Column(
          
          children: [
            Container(color: Colors.green, height: 100),
            AnimatedContainer(
              duration: const Duration(milliseconds: 200),
              height: expanded ? 120 : 0,
              child: Container(height: 120, color: Colors.red),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                FloatingActionButton(
                  heroTag: null,
                  child:
                      Icon(expanded ? Icons.arrow_upward : Icons.arrow_downward),
                  onPressed: () =&gt; setState(() {
                    expanded = !expanded;
                  }),
                ),
              ],
            ),
  
          ],
          
        ),
       
      );
    }
  }
  </code></pre>
  <p>I want to call Home Page with the bottom navigation from the drawer. Could you please help me with this?</p>