36 lines
998 B
Dart
36 lines
998 B
Dart
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");
|
|
},
|
|
)
|
|
]));
|
|
}
|