Skip to content

Instantly share code, notes, and snippets.

@FabDuarte
Created Oct 4, 2020
Embed
What would you like to do?
drawer: Drawer(
child: ListView(
// Important: Remove any padding from the ListView.
padding: EdgeInsets.zero,
children: <Widget>[
DrawerHeader(
child: Text('Menu drawer'),
decoration: BoxDecoration(
color: Colors.red,
),
),
ListTile(
leading: Icon(Icons.home, size: 40,),
title: Text('First item'),
subtitle: Text("This is the 1st item"),
trailing: Icon(Icons.more_vert),
onTap: () {
},
),
ListTile(
title: Text('Second item'),
onTap: () {
},
),
ListTile(
title: Text('Close the menu'),
onTap: () {
Navigator.pop(context);
},
)
],
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment