Skip to content

Conversation

@HansMuller
Copy link
Contributor

Added a UserAccountsDrawerHeader gallery demo.

Also made some tweaks to the UserAccountsDrawerHeader implementation:

  • All of the constructor parameters are now optional.
  • If background decoration is not specified then the theme's primary color is used.
  • The dropdown icon is only shown if the onDetailsPressed callback is specified.
  • Edited the dartdoc.
  • Added additional tests.

Fixes #7191
Fixes #7192

return Icons.arrow_back;
case TargetPlatform.iOS:
return Icons.arrow_back_ios;
}
Copy link
Contributor

@abarth abarth Dec 21, 2016

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

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]'),
Copy link
Contributor

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,
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@abarth
Copy link
Contributor

abarth commented Dec 21, 2016

LGTM

@@ -0,0 +1,185 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2016

@HansMuller HansMuller merged commit d05c7f6 into flutter:master Dec 21, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gallery should have an example of UserAccountsDrawerHeader UserAccountsDrawerHeader has required parameters but they are not marked as such

4 participants