Fix buttons with icons ignore provided foregroundColor#162880
Merged
auto-submit[bot] merged 3 commits intoflutter:masterfrom Feb 13, 2025
TahaTesser:button_icon_foregroundColor
Merged
Fix buttons with icons ignore provided foregroundColor#162880auto-submit[bot] merged 3 commits intoflutter:masterfrom TahaTesser:button_icon_foregroundColor
foregroundColor#162880auto-submit[bot] merged 3 commits intoflutter:masterfrom
TahaTesser:button_icon_foregroundColor
Conversation
Contributor
|
Related #161467 |
QuncCccccc
approved these changes
Feb 12, 2025
Contributor
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM:) Thanks for the fix!
| /// [ButtonStyle.iconColor] and [iconSize] is used to construct | ||
| /// [ButtonStyle.iconSize]. | ||
| /// | ||
| /// If [foregroundColor] is provided and [iconColor] is not provided, then the button icon will |
Contributor
There was a problem hiding this comment.
Maybe something like: If [iconColor] is null, the button icon will use [foregroundColor]. If [foregroundColor] is also null, the button icon will use the default icon color.
5 tasks
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 14, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 15, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 17, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 17, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 17, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 18, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 18, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 18, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 19, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 19, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 19, 2025
auto-submit bot
pushed a commit
that referenced
this pull request
Feb 20, 2025
…163201) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? PR: #162880 Issue: #162839 ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples Fixes buttons with icons ignore `foregroundColor`. ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) It impacts how buttons with icons render color when using `foregroundColor`. ### Workaround: Is there a workaround for this issue? Provide additional property such as `iconColor` along with `foregroundColor` to match colors for button label and icon. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Testing and samples.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 20, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 20, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 20, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 20, 2025
7h30n3
added a commit
to OPENER-next/OpenStop
that referenced
this pull request
Mar 7, 2025
Due to an upstream fix some lines of code could be removed flutter/flutter#162880
7h30n3
added a commit
to OPENER-next/OpenStop
that referenced
this pull request
Mar 10, 2025
Due to an upstream fix some lines of code could be removed flutter/flutter#162880
CodixNinja
pushed a commit
to CodixNinja/flutter
that referenced
this pull request
May 15, 2025
…#163201) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? PR: flutter/flutter#162880 Issue: flutter/flutter#162839 ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples Fixes buttons with icons ignore `foregroundColor`. ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) It impacts how buttons with icons render color when using `foregroundColor`. ### Workaround: Is there a workaround for this issue? Provide additional property such as `iconColor` along with `foregroundColor` to match colors for button label and icon. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Testing and samples.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 20, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 20, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 21, 2025
777genius
added a commit
to 777genius/flutter
that referenced
this pull request
Nov 18, 2025
Extended research with 2+ additional hours of deep analysis across theme properties, widget enhancements, and Material 3 compliance issues. New Issues Documented (Phase 2): - flutter#117755: Divider color inconsistencies M2/M3 (30-45 min, P2, 90%) - flutter#67409: TextField disabled errorText spacing (30-60 min, P2, 85%) Additional Discoveries Added to Tier D: - flutter#162585: SliverAppBar toolbarHeight theme (February 2025!) - flutter#159565: RawWebImage missing properties (P2, web platform) - flutter#159269: Radio fillColor theme (P2, under investigation) - flutter#105887: Divider styling options (dashed/dotted) - flutter#132214: DataTable dividerThickness: 0 bug - flutter#123943: SliverAppBar.medium/large foreground color - And 10+ more viable issues identified Fixed Issues Found During Research: - flutter#131690: ProgressIndicator properties (PR flutter#158104) - flutter#165294: ProgressIndicator strokeWidth adaptive (PR flutter#165370) - flutter#162839: Button icon color regression P1 (PR flutter#162880) Updated Statistics: - 700+ issues scanned (up from 600+) - 90+ issues deeply analyzed (up from 80+) - 180+ search queries (up from 150+) - 140+ categories explored (up from 120+) - 16 MD files with comprehensive documentation - 6+ hours total research time - ~80,000 words of documentation Updated TOP_FLUTTER_ISSUES.md: - Added new Tier A issues (flutter#117755, flutter#67409) - Expanded Tier D with recent discoveries - Updated recommended starting order (11 issues) - Enhanced statistics and insights - Added 10 fixed issues found during research
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Flutter 3.27 and later breaks past styling and theming of icon color on buttons with icons
Description
This PR fixes how the icon color is resolved in
ButtonStyleButton. This was regressed in #143501.Code Sample (taken from issue)
expand to view the code sample
Before
After
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.