Skip to content

ListTile overwrites IconButtonTheme for its children #167727

Closed
@pogojotz

Description

@pogojotz

Steps to reproduce

To set an icon color for its children ListTile fully recreates IconButtonThemeData with default settings and said icon color, instead of using IconButtonThemeData from context and copy it with the wanted color.

  1. Wrap ListTile in IconButtonTheme with some elaborate style settings
  2. Use IconButtons in ListTile's title, leading, trailing or subtitle parameters
  3. Optional: Set iconColor parameter in ListTile
  4. observe IconButtons

Expected results

IconButtons with elaborate IconButtonTheme, but with color from iconColor.

Actual results

Default styled IconButtons with color from iconColor

Code sample

Code example:

https://dartpad.dev/?id=870d2498d3d3c704b469f1c98815cd6f

Screenshots or Video

No response

Logs

Flutter Doctor output

Doctor output
[!] Flutter (Channel stable, 3.29.2, on Arch Linux 6.12.24-1-lts, locale de_DE.UTF-8) [163ms]
    • Flutter version 3.29.2 on channel stable at /home/jotz/devel/flutter
    ! The flutter binary is not on your path. Consider adding /home/jotz/devel/flutter/bin to your path.
    ! The dart binary is not on your path. Consider adding /home/jotz/devel/flutter/bin to your path.
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision c236373904 (6 weeks ago), 2025-03-13 16:17:06 -0400
    • Engine revision 18b71d647a
    • Dart version 3.7.2
    • DevTools version 2.42.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform
      update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [893ms]
    • Android SDK at /home/jotz/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/jotz/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome) [100ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop [187ms]
    • clang version 19.1.7
    • cmake version 4.0.1
    • ninja version 1.12.1
    • pkg-config version 2.4.3

[✓] Android Studio (version 2023.1) [98ms]
    • Android Studio at /home/jotz/android-studio
    • Flutter plugin version 78.0.1
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Community Edition (version 2024.3) [41ms]
    • IntelliJ at /usr/share/idea
    • Flutter plugin version 83.0.4
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (1 available) [38ms]
    • Linux (desktop) • linux • linux-x64 • Arch Linux 6.12.24-1-lts

[✓] Network resources [240ms]
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.f: themingStyling widgets with a themefound in release: 3.29Found to occur in 3.29found in release: 3.32Found to occur in 3.32frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions