Added DropdownMenuEntry.labelWidget#133491
Conversation
3205856 to
24e2023
Compare
There was a problem hiding this comment.
Could we improve the required label later on? Somebody could now try to specify only labelWidget, but then they have to do label: '' as well. What if we have only a Widget label internally, and provide a .textLabel(String label) named constructor instead? (This is a breaking change though)
There was a problem hiding this comment.
I think we always need a label, otherwise the search won't work, since the search always needs a text.
There was a problem hiding this comment.
If you made this a top level constant, you could access it from the test instead of duplicating it.
There was a problem hiding this comment.
When both label and labelWidget are specified, which one gets used for the semantics?
There was a problem hiding this comment.
Good question. The menu entry's MenuItemButton creates a TextButton which includes a container Semantics node, however the real semantics are provided by the labelWidget. So if your labelWidget doesn't include a Text widget or provide Semantics in some other way, then you've got an a11y problem. The same is true for all of the button classes.
54f603c to
9f6ec9d
Compare
flutter/flutter@6c95737...1fe2495 2023-08-30 [email protected] Update SelectableRegion test for M3 (flutter/flutter#129627) 2023-08-30 [email protected] Remove cirrus tests from the flutter framework. (flutter/flutter#133575) 2023-08-30 [email protected] Roll Flutter Engine from 749e67a947bc to 69f04bdfe952 (2 revisions) (flutter/flutter#133621) 2023-08-30 [email protected] [flutter roll] Revert "Fix `Chip.shape`'s side is not used when provided in Material 3" (flutter/flutter#133615) 2023-08-30 [email protected] Roll Flutter Engine from 9f2cf5c99b0f to 749e67a947bc (2 revisions) (flutter/flutter#133618) 2023-08-30 [email protected] Roll Flutter Engine from c5854a6b3658 to 9f2cf5c99b0f (4 revisions) (flutter/flutter#133616) 2023-08-30 [email protected] No longer include `.packages` in created `.gitignore` files (flutter/flutter#133484) 2023-08-30 [email protected] Roll Flutter Engine from db3ecf8b2739 to c5854a6b3658 (1 revision) (flutter/flutter#133610) 2023-08-29 [email protected] Roll Flutter Engine from 1feb9302050c to db3ecf8b2739 (4 revisions) (flutter/flutter#133609) 2023-08-29 [email protected] Fix one notDisposed leak and mark another. (flutter/flutter#133595) 2023-08-29 [email protected] Roll Flutter Engine from 01a1579808b5 to 1feb9302050c (1 revision) (flutter/flutter#133604) 2023-08-29 [email protected] Upgrade packages. (flutter/flutter#133593) 2023-08-29 [email protected] Cover more tests with leak tracking. (flutter/flutter#133596) 2023-08-29 [email protected] Roll Flutter Engine from 73cc3fb451fd to 01a1579808b5 (3 revisions) (flutter/flutter#133591) 2023-08-29 [email protected] Added DropdownMenuEntry.labelWidget (flutter/flutter#133491) 2023-08-29 [email protected] Use a fake stopwatch to remove flakiness. (flutter/flutter#133229) 2023-08-29 [email protected] Roll Flutter Engine from d1e6eb080f08 to 73cc3fb451fd (3 revisions) (flutter/flutter#133580) 2023-08-29 [email protected] [web] Migrate remaining web-only API usages to `dart:ui_web` (flutter/flutter#132248) 2023-08-29 [email protected] Add doxygen doc generation. (flutter/flutter#131356) 2023-08-29 [email protected] Roll Flutter Engine from 50bd80773287 to d1e6eb080f08 (2 revisions) (flutter/flutter#133570) 2023-08-29 [email protected] ShortcutManager should dispatch creation in constructor. (flutter/flutter#133487) 2023-08-29 [email protected] Add FAB Additional Color Mappings example (flutter/flutter#133453) 2023-08-29 [email protected] Roll Flutter Engine from 65438c7bb46a to 50bd80773287 (1 revision) (flutter/flutter#133565) 2023-08-29 [email protected] Roll Packages from 383bffa to d7d3150 (13 revisions) (flutter/flutter#133564) 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Fixes #126882
If the DropdownMenu's width is specified the menu items are now constrained to fit within the available horizontal space.
Added a
labelWidgetDropdownMenuEntry parameter to make it possible to override the automatically created label widget. By default the label widget isText(label)which precludes configuring the Text widget with parameters like maxLines or overflow.