Skip to content

Instantly share code, notes, and snippets.

@slamdon
Created February 9, 2020 06:47
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 slamdon/14773372607cc023e1d1c57fd5c6ec33 to your computer and use it in GitHub Desktop.
Save slamdon/14773372607cc023e1d1c57fd5c6ec33 to your computer and use it in GitHub Desktop.
Menu
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(title)),
body: currentPage,
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
DrawerHeader(
child: Image(
image: AssetImage('assets/banner.png'), fit: BoxFit.cover),
decoration: BoxDecoration(
color: Colors.blue,
),
padding: EdgeInsets.zero,
),
ListTile(
title: Text('Home'),
onTap: () {
menuTapHandler(0);
},
),
ListTile(
title: Text('Member'),
onTap: () {
menuTapHandler(1);
},
),
],
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment