mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 17:29:50 +08:00
AppDrawer: Add the icon instead of my name + email
There doesn't seem to be any way to automatically get the name + email of the user, so then there isn't anything to show. I'm adding the icon as a placeholder. It's better than nothing.
This commit is contained in:
@ -12,27 +12,25 @@ class AppDrawer extends StatelessWidget {
|
||||
// Important: Remove any padding from the ListView.
|
||||
padding: EdgeInsets.zero,
|
||||
children: <Widget>[
|
||||
new UserAccountsDrawerHeader(
|
||||
accountEmail: new Text("me@vhanda.in"),
|
||||
accountName: new Text("Vishesh Handa"),
|
||||
new DrawerHeader(
|
||||
decoration: new BoxDecoration(
|
||||
color: Colors.blue,
|
||||
color: Theme.of(context).accentColor,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/icon/icon.png'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
new ListTile(
|
||||
title: new Text('Item 1'),
|
||||
title: new Text('Share App'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
|
||||
// Update the state of the app
|
||||
// ...
|
||||
},
|
||||
),
|
||||
new ListTile(
|
||||
title: new Text('Item 2'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
|
||||
// Update the state of the app
|
||||
// ...
|
||||
},
|
||||
|
@ -19,6 +19,8 @@ dev_dependencies:
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- "assets/icon/icon.png"
|
||||
|
||||
flutter_icons:
|
||||
android: "launcher_icon"
|
||||
|
Reference in New Issue
Block a user