-
Notifications
You must be signed in to change notification settings - Fork 29.7k
UserAccountsDrawerHeader gallery demo, etc #7297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UserAccountsDrawerHeader gallery demo, etc #7297
Conversation
| return Icons.arrow_back; | ||
| case TargetPlatform.iOS: | ||
| return Icons.arrow_back_ios; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a helper function somewhere that does this for you (given a TargetPlatform)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will file an issue. I think we need to think about how to deal with platform-specific icons (and maybe other assets) in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #7299
| children: <Widget>[ | ||
| new UserAccountsDrawerHeader( | ||
| accountName: new Text('Zach Widget'), | ||
| accountEmail: new Text('[email protected]'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should use example.com given that we don't don't own flutter.com
| Widget accountNameLine = accountName == null ? null : new DefaultTextStyle( | ||
| style: const TextStyle( | ||
| fontWeight: FontWeight.w500, | ||
| color: Colors.white, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not come from one of the premade text themes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Theme.of(context).accentTextTheme.body1,2 do the right thing.
| @@ -0,0 +1,185 @@ | |||
| // Copyright 2015 The Chromium Authors. All rights reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2016
Added a UserAccountsDrawerHeader gallery demo.
Also made some tweaks to the UserAccountsDrawerHeader implementation:
Fixes #7191
Fixes #7192