mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +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.
|
// Important: Remove any padding from the ListView.
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new UserAccountsDrawerHeader(
|
new DrawerHeader(
|
||||||
accountEmail: new Text("me@vhanda.in"),
|
|
||||||
accountName: new Text("Vishesh Handa"),
|
|
||||||
decoration: new BoxDecoration(
|
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(
|
new ListTile(
|
||||||
title: new Text('Item 1'),
|
title: new Text('Share App'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
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
|
// Update the state of the app
|
||||||
// ...
|
// ...
|
||||||
},
|
},
|
||||||
|
@ -19,6 +19,8 @@ dev_dependencies:
|
|||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
assets:
|
||||||
|
- "assets/icon/icon.png"
|
||||||
|
|
||||||
flutter_icons:
|
flutter_icons:
|
||||||
android: "launcher_icon"
|
android: "launcher_icon"
|
||||||
|
Reference in New Issue
Block a user