/
drawer.txt
44 lines (43 loc) · 1.33 KB
/
drawer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Drawer
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Scaffold example"),
leading: Icon(FontAwesomeIcons.dragon),
),
drawer: Drawer(
child: ListView(
children: <Widget>[
UserAccountsDrawerHeader(
accountName: Text('Sandy'),
accountEmail: Text('HelloFlutter@gmail.com'),
currentAccountPicture: Image.asset('assets/images/flutter.jpg'),
decoration: BoxDecoration(color: Colors.blue),
),
ListTile(
leading: Icon(Icons.favorite),
title: Text('喜好項目'),
onTap: () {
Navigator.pop(context);
},
),
ListTile(
leading: Icon(Icons.headset),
title: Text('音樂收藏'),
onTap: () {
Navigator.pop(context);
},
),
ListTile(
leading: Icon(Icons.star),
title: Text('精選項目'),
onTap: () {
Navigator.pop(context);
},
),
],
),
),
body: Container());
}
}