Allows customization of the mouse cursor via ThemeData for InkWell/InkResponse#182652
Allows customization of the mouse cursor via ThemeData for InkWell/InkResponse#182652pagetronic wants to merge 7 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
The pull request introduces customization of the mouse cursor for InkWell and InkResponse via ThemeData. While this addresses a valid UX concern on desktop platforms, the current implementation has several technical and architectural issues. Specifically, the theme property is given precedence over the widget's local property, and the use of an unsafe cast limits the types of WidgetStateProperty that can be used. Furthermore, tying the generic InkWell primitive to textButtonTheme creates an inappropriate dependency across the Material library.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
The recent change in PR #171796, which changes the default mouse cursor for buttons to a basic arrow, explicitly cites its reason as being "as per updated Android guidance."
However, this platform-specific guidance has been implemented globally, affecting all platforms (except web and because Material specs..), including desktop.
On desktop platforms, a pointer/click cursor is the standard and universally expected user experience for interactive elements.
This has resulted in a significant UX regression for all non-Android platforms. The core issue is that a guideline intended for Android's touch-first interface has been applied to pointer-based platforms where the visual feedback of a cursor change is essential for usability.
Fixe this issue #182466
These changes, which preserve previous modifications while offering the possibility of modifying them via ThemeData.