title: How do I implement a Drawer menu in my pages?
body: <p>I have a dart file as a 'MyDrawer' and I want to add this drawer menu to my dashboard page. Here is my code. I don't know why it doesn't work.</p>
  <pre><code>  import 'package:flutter/material.dart';
  
    class MyDrawer extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
    return Drawer(
    child: ListView(
    
    padding: EdgeInsets.zero,
    children: &lt;Widget&gt;[
      DrawerHeader(
        child: Text('Menu drawer'),
        decoration: BoxDecoration(
          color: Colors.red,
        ),
      ),
      ListTile(
        leading: Icon(Icons.home, size: 40,),
        title: Text('First item'),
        subtitle: Text(&quot;This is the 1st item&quot;),
        trailing: Icon(Icons.more_vert),
        onTap: () {
        },
      ),
      ListTile(
        title: Text('Second item'),
        onTap: () {
        },
      ),
    ],
  ),
  );}}
  </code></pre>
  <p>And I'm calling this drawer menu in my dashboard page. It's like that;</p>
  <pre><code>  class Dash extends StatefulWidget { ...
  
    class _DashState extends State&lt;Dash&gt; { ...
    
   @override
   void initState(){ ...
  
   @override
   Widget build(BuildContext context) {
   return Scaffold(
   drawer: MyDrawer(),
    body: Container(
    ... ),
  
    
  </code></pre>