Repository navigation
PopupMenuButton uses color property for icon color #127802
Copy link
Copy link
Closed
Labels
found in release: 3.10Found to occur in 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11Found to occur in 3.11frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
Create app with PopumMenuButton
Set icon using icon property e.g. icon: Icon(Icons.more_horiz
Set color using color property e.g. color: Colors.white
Expected results
Documentation for the color property:
If provided, the background color used for the menu.
If this property is null, then [PopupMenuThemeData.color] is used.
If [PopupMenuThemeData.color] is also null, then Theme.of(context).cardColor is used.
Expect that the color of the popup card change
Actual results
The color of the icon changes.
Code sample
Code sample
PopupMenuButton(
icon: Icon(Icons.more_horiz),
color: Colors.white,
itemBuilder: (context) => [...]
)Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
found in release: 3.10Found to occur in 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11Found to occur in 3.11frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Type
Projects
- StatusShow more project fieldsDone (PR merged)
Activity
dam-ease commentedon May 30, 2023
I am able to reproduce this issue on the latest
masterandstablechannels. Adding color to the PopupMenuButton changes the color of both the Icon and the popup card in which case the documentation states otherwise. Although, adding color to the Icon is a possible workaround to having separate colors for the Icon and Popup card.Code Sample
flutter doctor -v
[✓] Flutter (Channel master, 3.11.0-2.0.pre.55, on macOS 13.3 22E252 darwin-arm64, locale en-NG) • Flutter version 3.11.0-2.0.pre.55 on channel master at /Users/dammya/fvm/versions/master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 835b892d7f (3 weeks ago), 2023-05-07 01:30:22 +0530 • Engine revision 23f730efbf • Dart version 3.1.0 (build 3.1.0-83.0.dev) • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/dammya/Library/Android/sdk • Platform android-33, build-tools 32.1.0-rc1 • ANDROID_HOME = /Users/dammya/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 14.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E222b • CocoaPods version 1.11.3 [✓] 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 2022.3.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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 [✓] VS Code (version 1.78.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] VS Code (version 1.78.0) • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents • Flutter extension version 3.50.0 [✓] Connected device (4 available) • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator) • iPhone 14 Pro (mobile) • DCF2031A-7EA9-42FF-8CD4-D4584F3E7A6D • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.3 22E252 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126 [✓] Network resources • All expected network resources are available. • No issues found![✓] Flutter (Channel stable, 3.10.2, on macOS 13.3 22E252 darwin-arm64, locale en-NG) • Flutter version 3.10.2 on channel stable at /Users/dammya/sdks/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 9cd3d0d9ff (5 days ago), 2023-05-23 20:57:28 -0700 • Engine revision 90fa3ae28f • Dart version 3.0.2 • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/dammya/Library/Android/sdk • Platform android-33, build-tools 32.1.0-rc1 • ANDROID_HOME = /Users/dammya/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 14.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E222b • CocoaPods version 1.11.3 [✓] 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 2022.3.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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 [✓] VS Code (version 1.78.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] VS Code (version 1.78.0) • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents • Flutter extension version 3.50.0 [✓] Connected device (4 available) • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator) • iPhone 14 Pro (mobile) • DCF2031A-7EA9-42FF-8CD4-D4584F3E7A6D • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.3 22E252 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126 [✓] Network resources • All expected network resources are available. • No issues found!Add `PopupMenuButton.iconColor`, `PopupMenuTheme.iconSize` and fix bu…
github-actions commentedon Aug 22, 2023
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.