Flutter Contributions - April, 2024
Taha Tesser
Fix disabled DropdownMenu
doesn't defer the mouse cursor
Fixed: https://github.com/flutter/flutter/issues/144611
Reviewers: HansMuller
Takeaways:
- Mouse cursor can update conditionally based on the
DropdownMenu
state andrequestFocusOnTap
property.- If
DropdownMenu
is enabled andrequestFocusOnTap
is true, the cursor will change toSystemMouseCursors.text
. - If
DropdownMenu
is enabled andrequestFocusOnTap
is false, the cursor will change toSystemMouseCursors.click
. - If
DropdownMenu
is disabled andrequestFocusOnTap
is true, the cursor will change toSystemMouseCursors.basic
. - If
DropdownMenu
is disabled andrequestFocusOnTap
is false, the cursor will change toSystemMouseCursors.basic
.
- If
- However, the cursor didn't change when the
DropdownMenu
was disabled and deferreed toSystemMouseCursors.basic
instead ofSystemMouseCursors.click
. It was relatively easy to fix this issue.
Add DropdownMenu
cursor behavior sample
Fixed: https://github.com/flutter/flutter/issues/146131
Reviewers: HansMuller
Takeaways:
- Added a sample to demonstrate the cursor behavior of the
DropdownMenu
widget. - The sample shows how the cursor changes based on the
DropdownMenu
state andrequestFocusOnTap
property. - This behavior was fixed in Fix disabled
DropdownMenu
doesn't defer the mouse cursor.