Skip to content

Conversation

@HansMuller
Copy link
Contributor

@HansMuller HansMuller commented Jul 9, 2021

Document how to style TextButtons so that their foreground color contrasts well with the AppBar's default background color.

The original remedy, #84642 (comment), turned out to be impractical. Documenting the work-around instead.

Fixes #84642

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jul 9, 2021
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla google-cla bot added the cla: yes label Jul 9, 2021
@HansMuller HansMuller requested a review from darrenaustin July 9, 2021 17:53
Copy link
Contributor

@darrenaustin darrenaustin left a comment

Choose a reason for hiding this comment

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

LGTM. I'm probably missing something, but would it make sense to have the AppBar wrap the children in a button theme that does this by default, or is that too fraught with problems for cases that don't want this?

@HansMuller
Copy link
Contributor Author

Yes it would but:

The original remedy, #84642 (comment), turned out to be impractical. Documenting the work-around instead.

It turns out that many existing components and apps, including DatePicker, don't work with the original remedy.

@Hixie
Copy link
Contributor

Hixie commented Jul 9, 2021

test-exempt: only affects comments

@HansMuller HansMuller merged commit c51ee11 into flutter:master Jul 9, 2021
@HansMuller HansMuller deleted the document_appbar_text_button_fix branch July 9, 2021 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextButton not working inside AppBar actions[ ]

3 participants