You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IconButton.styleFrom is missing iconColor property #163126
changed the title [-]`IconButton` only supports `ButtonStyle.iconColor` since `IconButton.styleFrom` doesn't have the `iconColor property[/-][+]`IconButton` only supports `ButtonStyle.iconColor` since `IconButton.styleFrom` doesn't have the `iconColor` property[/+]on Feb 12, 2025
changed the title [-]`IconButton` only supports `ButtonStyle.iconColor` since `IconButton.styleFrom` doesn't have the `iconColor` property[/-][+]`IconButton.styleFrom` is missing `iconColor property[/+]on Feb 12, 2025
changed the title [-]`IconButton.styleFrom` is missing `iconColor property[/-][+]`IconButton.styleFrom` is missing `iconColor` property[/+]on Feb 12, 2025
As long as the icon gets the correct color when using IconButton.styleFrom.foregroundColor that is fine imo. No need to pollute and confuse this convenience API with an extra iconColor when there is only one part to color in the IconButton, especially since foreground color already also has the disabledForegroundColor helper.
I was just concerned about what the behavior is when you use raw ButtonStyle on an IconButton and provide just foregroundColor or iconColor, or both, that all three cases work and that it also then has the right fallback priority via foregroundColor and then iconColor.
Sounds and looks like that part is covered and works OK.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-]`IconButton` only supports `ButtonStyle.iconColor` since `IconButton.styleFrom` doesn't have the `iconColor property[/-][+]`IconButton` only supports `ButtonStyle.iconColor` since `IconButton.styleFrom` doesn't have the `iconColor` property[/+][-]`IconButton` only supports `ButtonStyle.iconColor` since `IconButton.styleFrom` doesn't have the `iconColor` property[/-][+]`IconButton.styleFrom` is missing `iconColor property[/+][-]`IconButton.styleFrom` is missing `iconColor property[/-][+]`IconButton.styleFrom` is missing `iconColor` property[/+]TahaTesser commentedon Feb 12, 2025
Is it worth adding
iconColortoIconButton.styleFromor should we ignore it forIconButtonas it'd typically only have icon? @rydmike @QuncCcccccrydmike commentedon Feb 12, 2025
As long as the icon gets the correct color when using
IconButton.styleFrom.foregroundColorthat is fine imo. No need to pollute and confuse this convenience API with an extraiconColorwhen there is only one part to color in theIconButton, especially since foreground color already also has thedisabledForegroundColorhelper.I was just concerned about what the behavior is when you use raw
ButtonStyleon anIconButtonand provide justforegroundColororiconColor, or both, that all three cases work and that it also then has the right fallback priority viaforegroundColorand theniconColor.Sounds and looks like that part is covered and works OK.
TahaTesser commentedon Feb 12, 2025
Sounds good to me!
github-actions commentedon Feb 26, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.