BotZ_app/lib/ui/drawer.dart

36 lines
998 B
Dart
Raw Permalink Normal View History

2019-08-30 01:28:50 +02:00
import 'package:flutter/material.dart';
Drawer theDrawer(context) {
return Drawer(
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
DrawerHeader(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Icon(Icons.view_list),
Text("Main menu"),
]),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
)),
ListTile(
title: Row(children: <Widget>[Icon(Icons.home), Text("Home")]),
onTap: () {
Navigator.of(context).pushNamed("/");
},
),
ListTile(
title: Row(children: <Widget>[Icon(Icons.build), Text("Operations")]),
onTap: () {
Navigator.of(context).pushNamed("/operations");
},
),
ListTile(
title: Row(children: <Widget>[Icon(Icons.settings), Text("Settings")]),
onTap: () {
Navigator.of(context).pushNamed("/settings");
},
)
]));
}