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