-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Migrate ListTile unselected icon color to Material 3
#102078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate ListTile unselected icon color to Material 3
#102078
Conversation
fc81fa9 to
9d43cda
Compare
|
Just resolved conflicts |
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry for the lag on the response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment describing where the onSurface.withOpacity came from in the spec as this is not going through the usual token template system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added a comment for the color, similar to the icon_button.dart docs.
| /// * disabled - Theme.colorScheme.onSurface(0.38) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The disabled case is handled above on line 589. So this seems to be returning the incorrect color for enabled, non-selected list tile icons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 589 disabled color is for disabled list_tile, this wasn't the fix.
The wording was wrong in the issue and PR, apologies.
By disabled, it means unselected. This is the author's code, ListTile is not disabled.
home: Scaffold(
body: Column(
children: const [
ListTile(
leading: Icon(Icons.add_rounded),
),
Icon(Icons.add_rounded),
]
),
),The disabled case is handled above on line 589. So this seems to be returning the incorrect color for enabled, non-selected list tile icons.
In this case, I agree. At the time there were no specs for the list item but we have now and I can see the difference you're talking about.
I did a quick comparison here with Flutter vs Compose.
| Flutter | Compose |
|---|---|
![]() |
![]() |
ListTile needs a complete migration, just for unselected color.
Filed #114006, please take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think we'll be able to workaround this internally.
9d43cda to
cd8f031
Compare
* 5bb612c Roll Flutter Engine from 14eb83a7d0bd to a8e97892ce25 (1 revision) (flutter/flutter#110938) * 798ce22 Roll Flutter Engine from a8e97892ce25 to 0a2f56cd025f (1 revision) (flutter/flutter#110940) * 5de91d9 Roll Flutter Engine from 0a2f56cd025f to b040ed90175b (1 revision) (flutter/flutter#110954) * 202f577 Roll Flutter Engine from b040ed90175b to b94120dfe9c6 (1 revision) (flutter/flutter#110960) * d8fdb83 Update `MaterialBanner` to support Material 3 (flutter/flutter#105957) * fbba194 Migrate `ListTile` disabled icon color to Material 3 (flutter/flutter#102078) * f625359 Roll Flutter Engine from b94120dfe9c6 to 5a2861e499d2 (1 revision) (flutter/flutter#110972) * eb154d5 Roll Flutter Engine from 5a2861e499d2 to 3ff25eb9081c (1 revision) (flutter/flutter#110974) * 0144110 Roll Flutter Engine from 3ff25eb9081c to 47c281f218db (1 revision) (flutter/flutter#110983) * b166390 Roll Flutter Engine from 47c281f218db to 25642a45a55e (1 revision) (flutter/flutter#110991) * bce9163 Roll Flutter Engine from 25642a45a55e to 7b3710878503 (1 revision) (flutter/flutter#110992) * 8cddac7 Roll Flutter Engine from 7b3710878503 to 3c0898c0dfed (1 revision) (flutter/flutter#110993) * 96345a4 Roll Flutter Engine from 3c0898c0dfed to ddc5bb330254 (1 revision) (flutter/flutter#110999) * 723b82e Feat: dSYM debug info for iOS & macOS builds (flutter/flutter#101586)
ListTile disabled icon color to Material 3ListTile unselected icon color to Material 3
* 5bb612c Roll Flutter Engine from 14eb83a7d0bd to a8e97892ce25 (1 revision) (flutter/flutter#110938) * 798ce22 Roll Flutter Engine from a8e97892ce25 to 0a2f56cd025f (1 revision) (flutter/flutter#110940) * 5de91d9 Roll Flutter Engine from 0a2f56cd025f to b040ed90175b (1 revision) (flutter/flutter#110954) * 202f577 Roll Flutter Engine from b040ed90175b to b94120dfe9c6 (1 revision) (flutter/flutter#110960) * d8fdb83 Update `MaterialBanner` to support Material 3 (flutter/flutter#105957) * fbba194 Migrate `ListTile` disabled icon color to Material 3 (flutter/flutter#102078) * f625359 Roll Flutter Engine from b94120dfe9c6 to 5a2861e499d2 (1 revision) (flutter/flutter#110972) * eb154d5 Roll Flutter Engine from 5a2861e499d2 to 3ff25eb9081c (1 revision) (flutter/flutter#110974) * 0144110 Roll Flutter Engine from 3ff25eb9081c to 47c281f218db (1 revision) (flutter/flutter#110983) * b166390 Roll Flutter Engine from 47c281f218db to 25642a45a55e (1 revision) (flutter/flutter#110991) * bce9163 Roll Flutter Engine from 25642a45a55e to 7b3710878503 (1 revision) (flutter/flutter#110992) * 8cddac7 Roll Flutter Engine from 7b3710878503 to 3c0898c0dfed (1 revision) (flutter/flutter#110993) * 96345a4 Roll Flutter Engine from 3c0898c0dfed to ddc5bb330254 (1 revision) (flutter/flutter#110999) * 723b82e Feat: dSYM debug info for iOS & macOS builds (flutter/flutter#101586)
* 5bb612c Roll Flutter Engine from 14eb83a7d0bd to a8e97892ce25 (1 revision) (flutter/flutter#110938) * 798ce22 Roll Flutter Engine from a8e97892ce25 to 0a2f56cd025f (1 revision) (flutter/flutter#110940) * 5de91d9 Roll Flutter Engine from 0a2f56cd025f to b040ed90175b (1 revision) (flutter/flutter#110954) * 202f577 Roll Flutter Engine from b040ed90175b to b94120dfe9c6 (1 revision) (flutter/flutter#110960) * d8fdb83 Update `MaterialBanner` to support Material 3 (flutter/flutter#105957) * fbba194 Migrate `ListTile` disabled icon color to Material 3 (flutter/flutter#102078) * f625359 Roll Flutter Engine from b94120dfe9c6 to 5a2861e499d2 (1 revision) (flutter/flutter#110972) * eb154d5 Roll Flutter Engine from 5a2861e499d2 to 3ff25eb9081c (1 revision) (flutter/flutter#110974) * 0144110 Roll Flutter Engine from 3ff25eb9081c to 47c281f218db (1 revision) (flutter/flutter#110983) * b166390 Roll Flutter Engine from 47c281f218db to 25642a45a55e (1 revision) (flutter/flutter#110991) * bce9163 Roll Flutter Engine from 25642a45a55e to 7b3710878503 (1 revision) (flutter/flutter#110992) * 8cddac7 Roll Flutter Engine from 7b3710878503 to 3c0898c0dfed (1 revision) (flutter/flutter#110993) * 96345a4 Roll Flutter Engine from 3c0898c0dfed to ddc5bb330254 (1 revision) (flutter/flutter#110999) * 723b82e Feat: dSYM debug info for iOS & macOS builds (flutter/flutter#101586)


Updates
ListTiledefault unselected icon color to Material 3.Fixes #99400
Part of: #91605
Disabled icon specs from https://m3.material.io/components/buttons/specs
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.