Skip to content

Fix DropdownMenu does not apply opacity to the selected value when disabled #170336

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

Conversation

huycozy
Copy link
Member

@huycozy huycozy commented Jun 10, 2025

Fix #169942

Description

The bug is about the effectiveTextStyle being applied to the inner TextField inside DropdownMenu fails to reflect the disabled style based on the enabled property.
The fix for this is simply to check the enabled property and override the TextField's TextStyle.

Demo of the fix

before after
before.mov
after.mov

Pre-launch Checklist

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

@huycozy huycozy self-assigned this Jun 10, 2025
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jun 10, 2025
@huycozy huycozy force-pushed the fix-dropdownmenu-opacity-selected-value-disabled-169942 branch from 8fc8dd2 to c57ae72 Compare June 10, 2025 11:39
@huycozy huycozy marked this pull request as ready for review June 10, 2025 14:12
@huycozy huycozy requested a review from QuncCccccc June 10, 2025 14:14
@huycozy huycozy requested a review from QuncCccccc June 30, 2025 09:40
huycozy added 2 commits June 30, 2025 16:43
…sabled

Signed-off-by: huycozy <huy@nevercode.io>
…nu's in the disabled state

Signed-off-by: huycozy <huy@nevercode.io>
@huycozy huycozy force-pushed the fix-dropdownmenu-opacity-selected-value-disabled-169942 branch from b2802ce to b372da0 Compare June 30, 2025 09:46
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding it in DropdownMenu theme sounds better. Thank you! LGTM.

@QuncCccccc QuncCccccc added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Jul 2, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jul 2, 2025
Merged via the queue into flutter:master with commit c2aa518 Jul 2, 2025
72 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 2, 2025
@huycozy huycozy deleted the fix-dropdownmenu-opacity-selected-value-disabled-169942 branch July 2, 2025 04:40
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

DropdownMenu does not apply opacity to the selected value when disabled
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy