workouttest_app/lib/widgets/nav_drawer.dart
2020-05-24 10:04:37 +02:00

44 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
class NavDrawer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
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'),
),
],
),
);
}
}