Repository navigation
ExpansionTile.backgroundColor & ExpansionTile.collapsedBackgroundColor removes splash effect #107113
Description
Activity
Some more details:
ExpansionTileuses aBoxDecorationon aContainerthat wraps an underlyingListTile. TheBoxDecorationprovides abackgroundBlendModeproperty that defaults toBlendMode.srcOver, and theExpansionTiledoes not provide a mechanism to override this.Suggested next steps
- In a minor release: add an optional
backgroundBlendModeproperty toExpansionTilethat forwards to the underlyingBoxDecoration. - Consider adding better documentation around this use case. For example, a note on the
backgroundColorproperty suggesting that the default blend mode issrcOverand thatsrcATopmight be more expected (figure out what actually would be the right value here). - In a major release, consider changing the default value to something more intuitive.
- In a minor release: add an optional
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jul 6, 2022 Hi @TzviPM, Thanks for filing the issue. The issue is reproducible on the latest stable and master channel. hover Ink is not visible when
backgroundColoris specified.Screen.Recording.2022-07-06.at.12.52.05.PM.mov
flutter doctor -v (mac)
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-arm, locale en-IN) • Flutter version 3.0.4 at /Users/mahesh/Documents/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 85684f9300 (4 days ago), 2022-06-30 13:22:47 -0700 • Engine revision 6ba2af10bb • Dart version 2.17.5 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-32, build-tools 33.0.0-rc4 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Community Edition (version 2021.2.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 61.2.4 • Dart plugin version 212.5080.8 [✓] VS Code (version 1.67.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.44.0 [✓] Connected device (3 available) • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.53 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found![✓] Flutter (Channel master, 3.1.0-0.0.pre.1494, on macOS 12.4 21F79 darwin-arm, locale en-IN) • Flutter version 3.1.0-0.0.pre.1494 on channel master at /Users/mahesh/Documents/flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 829bddf616 (3 hours ago), 2022-07-04 03:49:08 -0400 • Engine revision e78ed7f1c9 • Dart version 2.18.0 (build 2.18.0-251.0.dev) • DevTools version 2.15.0 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-32, build-tools 33.0.0-rc4 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13C100 • CocoaPods version 1.11.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Community Edition (version 2021.2.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 61.2.4 • Dart plugin version 212.5080.8 [✓] VS Code (version 1.67.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.44.0 [✓] Connected device (3 available) • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.53 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found!- addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packageshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onfound in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1and removedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jul 6, 2022 - addedc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutter
on Jul 7, 2022 Although this is a bit of a special case, the proposal sounds reasonable.
I have updated the dartpad example to use
MaterialStateColorin order to show that it also doesn't work as expected. After discussing with @Piinks, it seems that the right path forward is to makebackgroundColorsupportMaterialStateColor- addedteam-designOwned by Design Languages teamOwned by Design Languages team
on Jul 8, 2023 2 remaining items
This issue is assigned but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
- addedP2Important issues not at the top of the work listImportant issues not at the top of the work listtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
on Jul 26, 2023 - changed the title
[-][flutter/material] ExpansionTile backgroundColor overrides hover opacity[/-][+]`ExpansionTile. backgroundColor` & `ExpansionTile. collapsedBackgroundColor` removes splash effect[/+]on Oct 2, 2023 - changed the title
[-]`ExpansionTile. backgroundColor` & `ExpansionTile. collapsedBackgroundColor` removes splash effect[/-][+]`ExpansionTile.backgroundColor` & `ExpansionTile.collapsedBackgroundColor` removes splash effect[/+]on Oct 2, 2023 - added a commit that references this issue
on Jan 22, 2024 - moved this from PR submitted to Done (PR merged) in Nevercode
on Jan 22, 2024 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.- locked as resolved and limited conversation to collaborators
on Feb 5, 2024
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone (PR merged)
Steps to Reproduce
ExpansionTilewidgetExpected results: The opacity should be changed on hover to reflect the tap affordance of the widget (i.e. it's a button)
Actual results: Overriding the
backgroundColorof theExpansionTilealso overrode the hover opacity.Code sample
See https://dartpad.dev/bb018c7bfe104bbfe78185a7fc6641e4
Screen Recording:
flutter-expension-tile-bug.webm