Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@FabDuarte
Created October 4, 2020 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FabDuarte/50a32f15f63b246b665386bc031c8c0a to your computer and use it in GitHub Desktop.
Save FabDuarte/50a32f15f63b246b665386bc031c8c0a to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
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: () {
},
),
],
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment