import 'package:flutter/material.dart'; class NavDrawer extends StatelessWidget { @override Widget build(BuildContext context) { return Drawer( child: ListView( padding: EdgeInsets.zero, children: [ DrawerHeader( child: Text( 'Customers And Exercises', style: TextStyle(color: Colors.blue, fontSize: 25), ), ), ListTile( leading: Icon(Icons.home), title: Text('Home'), onTap: () => Navigator.of(context).pushNamed('home'), ), ListTile( leading: Icon(Icons.people), title: Text('Customers'), //onTap: () => navigateToPage(context, 'customersPage'), onTap: () => Navigator.of(context).pushNamed('customersPage'), ), ListTile( leading: Icon(Icons.directions_run), title: Text('Exercises'), onTap: () => Navigator.of(context).pushNamed('exerciseTypeListPage'), ), ListTile( leading: Icon(Icons.arrow_upward), title: Text("TRAINING!"), onTap: () => Navigator.of(context).pushNamed('exerciseNewPage'), ), ], ), ); } }