Skip to content

Conversation

@zzzev
Copy link
Contributor

@zzzev zzzev commented Aug 30, 2017

This makes the leading and trailing Widgets behave the same way. What I changed in this PR is closely based on the existing code for the leading element.

Currently, they render differently, as you can see in these two screenshots:
leading
trailing

@Hixie
Copy link
Contributor

Hixie commented Aug 30, 2017

This will need a test.

alignment: FractionalOffset.centerRight,
child: trailing,
children.add(IconTheme.merge(
data: new IconThemeData(color: _iconColor(theme, tileTheme)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth factoring out new IconThemeData(color: _iconColor(theme, tileTheme)), into a value that you use for leading and trailing (which would only be initialized if either is non-null, obviously).

@Hixie
Copy link
Contributor

Hixie commented Aug 31, 2017

This seems pretty good, thanks for the contribution!

Just needs a test to make sure we don't accidentally revert the behaviour at some point.

IconThemeData iconThemeData;
if (leading != null || trailing != null) {
iconThemeData = new IconThemeData(color: _iconColor(theme, tileTheme));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: our style guide says to avoid the braces for one-line if statements.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like you missed this one

@Hixie
Copy link
Contributor

Hixie commented Sep 6, 2017

The test looks great, if you could rebase (looks like there's a conflict) and fix the trivial style nit, I can land it for you! Thanks again!

@zzzev
Copy link
Contributor Author

zzzev commented Sep 8, 2017

I think I've taken care of the mentioned issues, let me know if there's anything additional that needs to be done here.

@Hixie
Copy link
Contributor

Hixie commented Sep 15, 2017

LGTM except for the minor style nit.
I can land this for you when you're ready, thanks for the contribution!

@Hixie
Copy link
Contributor

Hixie commented Sep 20, 2017

Thanks!

@Hixie Hixie merged commit cb2204d into flutter:master Sep 20, 2017
@Hixie
Copy link
Contributor

Hixie commented Sep 23, 2017

This caused a regression, see #12221.

tvolkert added a commit that referenced this pull request Sep 24, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 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.

3 participants