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

145686 Preview

Takeaways:

  • Mouse cursor can update conditionally based on the DropdownMenu state and requestFocusOnTap property.
    • If DropdownMenu is enabled and requestFocusOnTap is true, the cursor will change to SystemMouseCursors.text.
    • If DropdownMenu is enabled and requestFocusOnTap is false, the cursor will change to SystemMouseCursors.click.
    • If DropdownMenu is disabled and requestFocusOnTap is true, the cursor will change to SystemMouseCursors.basic.
    • If DropdownMenu is disabled and requestFocusOnTap is false, the cursor will change to SystemMouseCursors.basic.
  • However, the cursor didn't change when the DropdownMenu was disabled and deferreed to SystemMouseCursors.basic instead of SystemMouseCursors.click. It was relatively easy to fix this issue.

Add DropdownMenu cursor behavior sample

Fixed: https://github.com/flutter/flutter/issues/146131

Reviewers: HansMuller

146133 Preview

Takeaways: