Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Apr 18, 2022

Updates ListTile default unselected icon color to Material 3.

Fixes #99400

Part of: #91605

Disabled icon specs from https://m3.material.io/components/buttons/specs

Screenshot 2022-04-18 at 15 02 39

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 18, 2022
@TahaTesser TahaTesser requested a review from HansMuller April 18, 2022 13:51
@darrenaustin darrenaustin self-requested a review April 28, 2022 19:58
@HansMuller HansMuller removed their request for review June 2, 2022 16:45
@TahaTesser TahaTesser force-pushed the m3_list_tile_icon_color branch from fc81fa9 to 9d43cda Compare July 18, 2022 08:13
@TahaTesser
Copy link
Member Author

Just resolved conflicts

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. Sorry for the lag on the response.

Copy link
Contributor

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.

Copy link
Member Author

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)

Copy link
Member

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.

Copy link
Member Author

@TahaTesser TahaTesser Oct 25, 2022

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.

Copy link
Member

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.

@TahaTesser TahaTesser force-pushed the m3_list_tile_icon_color branch from 9d43cda to cd8f031 Compare September 5, 2022 09:01
@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 5, 2022
@auto-submit auto-submit bot merged commit fbba194 into flutter:master Sep 5, 2022
@TahaTesser TahaTesser deleted the m3_list_tile_icon_color branch September 5, 2022 10:19
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
stuartmorgan-g pushed a commit to flutter/plugins that referenced this pull request Sep 6, 2022
* 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)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 7, 2022
@TahaTesser TahaTesser changed the title Migrate ListTile disabled icon color to Material 3 Migrate ListTile unselected icon color to Material 3 Oct 25, 2022
adam-harwood pushed a commit to adam-harwood/flutter_plugins that referenced this pull request Nov 3, 2022
* 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)
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App 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.

Migrate ListTile unselected icon color to Material 3

3 participants