Last active
May 27, 2018 19:20
-
-
Save Gogetter/d5d91ed638b473e1ee4158657f626406 to your computer and use it in GitHub Desktop.
adding UserAccountsDrawerHeader to Drawer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return new Scaffold( | |
appBar: new AppBar( | |
) | |
), | |
drawer: new Drawer( | |
child: new ListView( | |
children: <Widget>[ | |
//display current user info | |
new UserAccountsDrawerHeader( | |
decoration: new BoxDecoration(color: Colors.white), | |
currentAccountPicture: new CircleAvatar( | |
backgroundImage: currentUser.photoUrl.isNotEmpty ? | |
new NetworkImage(currentUser.photoUrl) : currentUser.displayName.substring(0)), | |
accountName: new Text('Welcome, ${currentUser.displayName}', style: _userInfoTxtStyle), | |
accountEmail: new Text(currentUser.email?? '', style: _userInfoTxtStyle) | |
), | |
], | |
), | |
), | |
body: new Center( | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment