You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new "clickable" mouseCursor is inappropriate and confusing for desktop apps, and the implementation of defaulting to a static const in every widget using cursors means a single point of responsibility for cursor behavior is not accessible to developers.
The default mouseCursor for any widgets using it should be in ButtonThemeData, not a hardcoded const.
Proposal
ButtonThemeData.mouseCursor field is added, and all buttons and other Widgets in a given BuildContext using MaterialStateMouseCursor.clickable instead use ButtonTheme.of(context).mouseCursor.
#59702, which - if all goes well - should land in the next week or so, adds mouse cursor support to the new (replacement) button classes and their themes. I'd really prefer to not make additional changes to ButtonTheme because that's what we're trying to leave behind. However, I think it it would make sense for Theme/ThemeData to define an overall default mouse cursor.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
dkwingsmt commentedon Jun 17, 2020
I agree that we should be able to customize cursors globally in theming.
@HansMuller Do you think it's ok to add these APIs despite the ongoing theming update?
HansMuller commentedon Jun 17, 2020
#59702, which - if all goes well - should land in the next week or so, adds mouse cursor support to the new (replacement) button classes and their themes. I'd really prefer to not make additional changes to ButtonTheme because that's what we're trying to leave behind. However, I think it it would make sense for Theme/ThemeData to define an overall default mouse cursor.
JonLatane commentedon Jun 17, 2020
Woohoo! Wasn't aware of this pending change. Looks good to me so far. Thank you!
gspencergoog commentedon Oct 14, 2020
@HansMuller should this issue be closed?
HansMuller commentedon Oct 14, 2020
Yes, I'm going to close this issue. The new buttons define default mouse cursors and one can override the mouse cursor using a constructor parameter or a theme - https://flutter.dev/go/material-button-system-updates.
github-actions commentedon Aug 11, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.