mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() ## Description This PR makes DropdownMenu rematching the initialSelection when the entries are updated. If the new entries contains one entry whose value matches `initialSelection` this entry's label is used to initialize the inner text field, if no entries matches `initialSelection` the text field is emptied. ## Related Issue Fixes [DropdownMenu.didUpdateWidget should re-match initialSelection when dropdownMenuEntries have changed](https://github.com/flutter/flutter/issues/155660). ## Tests Adds 3 tests. |
||
---|---|---|
.. | ||
dropdown_menu_entry_label_widget.0.dart | ||
dropdown_menu.0.dart | ||
dropdown_menu.1.dart | ||
dropdown_menu.2.dart |