Skip to content

Add a "troubleshooting" section to the AppBar API doc - #86188

Merged
HansMuller merged 1 commit into
flutter:masterfrom
HansMuller:document_appbar_text_button_fix
Jul 9, 2021
Merged

HansMuller merged 1 commit into
flutter:masterfrom
HansMuller:document_appbar_text_button_fix

Conversation

@HansMuller

@HansMuller HansMuller commented Jul 9, 2021 •

Copy link
Copy Markdown
Contributor

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 p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. labels Jul 9, 2021
@flutter-dashboard

Copy link
Copy Markdown

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

@darrenaustin darrenaustin left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Hixie commented Jul 9, 2021

Copy link
Copy Markdown
Contributor

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
@werainkhatri werainkhatri mentioned this pull request May 6, 2023
7 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextButton not working inside AppBar actions[ ]

3 participants