import 'package:flutter/material.dart'; import 'package:invoiceninja/routes.dart'; class CustomDrawer extends StatelessWidget { final String companyName; CustomDrawer({ Key key, @required this.companyName, }) : super(key: key); @override Widget build(BuildContext context) { return Drawer( child: ListView( children: [ Container( child: DrawerHeader( child: Column( children: [ Expanded( child: Center( child: Text('Logo'), ), ), Text(this.companyName), ], )), color: Colors.white10, ), ListTile( leading: Icon(Icons.dashboard), title: Text('Dashboard'), onTap: () { Navigator.of(context).popAndPushNamed(AppRoutes.dashboard); }, ), /* ListTile( leading: Icon(Icons.people), title: Text('Clients'), onTap: () { Navigator.of(context).pop(); Navigator.of(context).pushNamed(AppRoutes.clientScreen); }, ), */ ListTile( leading: Icon(Icons.language), title: Text('Products'), onTap: () { Navigator.of(context).popAndPushNamed(AppRoutes.products); }, ), /* ListTile( leading: Icon(Icons.email), title: Text('Invoices'), onTap: () {}, ), */ ListTile( leading: Icon(Icons.power_settings_new), title: Text('Log Out'), onTap: () { Navigator.of(context).popAndPushNamed(AppRoutes.login); }, ), ], ), ); } }