Skip to content

Instantly share code, notes, and snippets.

@FabDuarte
Created October 4, 2020 01:02
Show Gist options
  • Save FabDuarte/937239318f097ab1111dbbc0cbd7a612 to your computer and use it in GitHub Desktop.
Save FabDuarte/937239318f097ab1111dbbc0cbd7a612 to your computer and use it in GitHub Desktop.
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