Fix DropdownMenu width when decorationBuilder provides label#178465
Merged
auto-submit[bot] merged 1 commit intoflutter:masterfrom Nov 17, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where the DropdownMenu width was not calculated correctly when a label was provided via decorationBuilder. The change introduces effectiveLabel to consider InputDecoration.label and InputDecoration.labelText from the decorationBuilder when calculating the menu's preferred width. The implementation is correct and well-tested with two new widget tests that cover both label and labelText cases. The changes look good and address the reported issue effectively.
fb5b80a to
4aea416
Compare
4aea416 to
fe47ef4
Compare
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 18, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 18, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 18, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 18, 2025
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Nov 18, 2025
flutter/flutter@cc14ef5...cb7b7df 2025-11-18 [email protected] Enable UIScene Migration and update create templates (flutter/flutter#178700) 2025-11-18 Minsuk Jung Fix #160622: change containsWatchConpanion function to detect companion watch apps defined by only the project info file. (flutter/flutter#176832) 2025-11-18 [email protected] Roll Skia from 614e71550fc3 to ca906091e199 (2 revisions) (flutter/flutter#178716) 2025-11-18 [email protected] Revert "[ Tool ] Don't delete `.dart_tool/widget_preview_scaffold` during `flutter clean` (#175664)" (flutter/flutter#178672) 2025-11-18 [email protected] Add missing flutter_lints dev dependencies (flutter/flutter#178105) 2025-11-18 [email protected] Roll Skia from ec2f626cdcad to 614e71550fc3 (3 revisions) (flutter/flutter#178708) 2025-11-18 [email protected] Roll Dart SDK from a8ad764281e3 to 312845b06afc (1 revision) (flutter/flutter#178704) 2025-11-18 [email protected] Roll Skia from d7268f8245f2 to ec2f626cdcad (1 revision) (flutter/flutter#178703) 2025-11-18 [email protected] Refactor SnackBar behavior selection example to use `RadioGroup` (flutter/flutter#178618) 2025-11-18 [email protected] Add framework-side hitTestBehavior support for Semantics widget and apply to ModalRoute (flutter/flutter#177570) 2025-11-18 [email protected] Fix deprecation warning in some API examples using RadioListTile (flutter/flutter#178635) 2025-11-18 [email protected] Roll Skia from 47fd0d9b1044 to d7268f8245f2 (6 revisions) (flutter/flutter#178695) 2025-11-18 [email protected] Roll Dart SDK from cf94632d94a1 to a8ad764281e3 (1 revision) (flutter/flutter#178694) 2025-11-18 [email protected] [fuchsia] Add wrapper for zx_iob_writev (flutter/flutter#178626) 2025-11-17 [email protected] Make a11y `computeChildGeometry` slightly faster (flutter/flutter#177477) 2025-11-17 [email protected] Fix DropdownMenu width when decorationBuilder provides label (flutter/flutter#178465) 2025-11-17 [email protected] Add DropdownMenuFormField.decorationBuilder (flutter/flutter#178640) 2025-11-17 [email protected] Roll Skia from 84c83c0dfb4a to 47fd0d9b1044 (4 revisions) (flutter/flutter#178673) 2025-11-17 [email protected] Small cleanup in `AndroidTouchProcessor.java` (flutter/flutter#178574) 2025-11-17 [email protected] Remove unnecessary `final` modifier in `StandardMessageCodec.java` (flutter/flutter#178598) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
IvoneDjaja
pushed a commit
to IvoneDjaja/flutter
that referenced
this pull request
Nov 22, 2025
…#178465) ## Description This PR fixes `DropdownMenu` preferred width calculation to include the label provided by `DropdownMenu.decorationBuilder`. ## Before <img width="225" height="63" alt="Image" src="proxy.php?url=https://github.com/user-attachments/assets/47dbec7d-c59c-4379-8f22-792c844f6ac4" /> ## After <img width="225" height="63" alt="Image" src="proxy.php?url=https://github.com/user-attachments/assets/d4223e56-2b3f-4e12-893a-284ceb3b8ea4" /> ## Related Issue Fixes [DropdownMenu wrong width when decorationBuilder provides label ](flutter#178459) ## Tests - Adds 2 tests.
mboetger
pushed a commit
to mboetger/flutter
that referenced
this pull request
Dec 2, 2025
…#178465) ## Description This PR fixes `DropdownMenu` preferred width calculation to include the label provided by `DropdownMenu.decorationBuilder`. ## Before <img width="225" height="63" alt="Image" src="proxy.php?url=https://github.com/user-attachments/assets/47dbec7d-c59c-4379-8f22-792c844f6ac4" /> ## After <img width="225" height="63" alt="Image" src="proxy.php?url=https://github.com/user-attachments/assets/d4223e56-2b3f-4e12-893a-284ceb3b8ea4" /> ## Related Issue Fixes [DropdownMenu wrong width when decorationBuilder provides label ](flutter#178459) ## Tests - Adds 2 tests.
reidbaker
pushed a commit
to AbdeMohlbi/flutter
that referenced
this pull request
Dec 10, 2025
…#178465) ## Description This PR fixes `DropdownMenu` preferred width calculation to include the label provided by `DropdownMenu.decorationBuilder`. ## Before <img width="225" height="63" alt="Image" src="proxy.php?url=https://github.com/user-attachments/assets/47dbec7d-c59c-4379-8f22-792c844f6ac4" /> ## After <img width="225" height="63" alt="Image" src="proxy.php?url=https://github.com/user-attachments/assets/d4223e56-2b3f-4e12-893a-284ceb3b8ea4" /> ## Related Issue Fixes [DropdownMenu wrong width when decorationBuilder provides label ](flutter#178459) ## Tests - Adds 2 tests.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes
DropdownMenupreferred width calculation to include the label provided byDropdownMenu.decorationBuilder.Before
After
Related Issue
Fixes DropdownMenu wrong width when decorationBuilder provides label
Tests