flutter/examples/api/lib/material/dropdown_menu
Bruno Leroux 21381d843f
Fix DropdownMenu does not rematch initialSelection when entries have changed (#155757)
## 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.
2024-10-02 12:03:20 +00:00
..
dropdown_menu_entry_label_widget.0.dart Added DropdownMenuEntry.labelWidget (#133491) 2023-08-29 13:01:49 -07:00
dropdown_menu.0.dart Fix DropdownMenu does not rematch initialSelection when entries have changed (#155757) 2024-10-02 12:03:20 +00:00
dropdown_menu.1.dart Fix DropdownMenu does not rematch initialSelection when entries have changed (#155757) 2024-10-02 12:03:20 +00:00
dropdown_menu.2.dart Fix DropdownMenu does not rematch initialSelection when entries have changed (#155757) 2024-10-02 12:03:20 +00:00