Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Someway to have Gestures w/ Mouse Cursor? #48

Open
esDotDev opened this issue Jun 19, 2020 · 1 comment
Open

Someway to have Gestures w/ Mouse Cursor? #48

esDotDev opened this issue Jun 19, 2020 · 1 comment

Comments

@esDotDev
Copy link

esDotDev commented Jun 19, 2020

In the latest Flutter they have enabled a classic HandCursor for Desktop and Web with:

MouseRegion(mouseCursor: SystemMouseCursors.click)

Would be nice if this could be wrapped around the .gestures() call if any of the onTap fxns are overriden. Or just expose a variable for it?

Alternatively a .clickable(Function onTapUp, Function onTapDown) could be really cool? Which is just a MR + GT and some syntactic sugar because we never really care about TapUpDetails

@ReinBentdal
Copy link
Owner

This should fit nicely in this library. I would suggest both implementing MouseRegion as a method as well as a clickable method. MouseRegion being a complete implementation while clickable being a nice wrapper, like you described. I still think the callback functions would be complete with TapUpDetails for example. Maybe have the arguments like:

.clickable({
    GestureOnTapChangeCallback? onTapChange,
    GestureTapDownCallback? onTapDown,
    GestureTapUpCallback? onTapUp,
    GestureTapCallback? onTap,
    SystemMouseCursors.click mouseCursor,
})

What do you think? I would gladly accept a pull request which implements this in a nice way. I will probably not prioritizing implementing this on my own in the short term future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants