import 'package:flutter/material.dart';

class AppDrawer extends StatelessWidget {
  Widget build(BuildContext context) {
    return Drawer(
        child: Column(children: [
      Container(
        alignment: Alignment.centerLeft,
        height: 40,
        color: Colors.blue,
        margin: EdgeInsets.only(left: 10),
        child: Text(
          'Navigation',
          style: TextStyle(fontSize: 25, color: Colors.white),
        ),
      ),
      ListTile(
        leading: Icon(Icons.ad_units, color: Colors.purple[200]),
        title: Text('Home'),
        onTap: () {
          Navigator.pushNamed(context, '/'); // named route
        },
      ), // more ListTiles here
      ListTile(
        leading: Icon(Icons.account_box, color: Colors.pink[200]),
        title: Text('By Actor'),
        onTap: () {
          Navigator.pushNamed(context, '/second'); // named route
        },
      ),
      ListTile(
        leading: Icon(Icons.access_alarm, color: Colors.blue[200]),
        title: Text('By Year'),
        onTap: () {
          Navigator.pushNamed(context, '/third');
        },
      ),
      ListTile(
        leading: Icon(Icons.favorite, color: Colors.blue[400]),
        title: Text('Top Rate'),
        onTap: () {
          Navigator.pushNamed(context, '/fourth');
        },
      ),
    ])); //Drawer }//build
  } // AppDrawer class
}
