mirror of
https://github.com/flutter/flutter.git
synced 2026-01-09 07:51:35 +08:00
## Description This PR adds logic to resolve `DropdownMenuEntry.style` properties with the correct `WidgetState` when an item is highlighted. When `MenuItemButton` are highlighted the focused state is not added automatically because the focus does not move to the items (it stays on the `TextField` in order to let the user enters text to filter the items list). This PR sets the `MenuItemButton.statesController` with a forced focused state to let `MenuItemButton` know that the focused state should be use to resolve the properties. ## Related Issue Fixes [DropdownMenuEntry style's text style is not resolving with states](https://github.com/flutter/flutter/issues/177363) ## Tests - Adds 1 tests.