-
Notifications
You must be signed in to change notification settings - Fork 601
make ink=True behavior consistent with ink=False #427
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
Conversation
Use onTapDown instead of onTap like ink = False Also: passing a dummy callback to onTap when onHover is True to enble the widget instead of passing a ws.pageEventFromWeb callback to onTap and onLongPress to reduce websocket traffic
|
Could you please elaborate what you changes about? |
|
Is it about this? |
|
Yes. First, I use onTapDown to trigger onclick callback instead of onTap when ink = True, which is the same as ink = False case, so that onclick callback can receive position data when ink = True. |
|
Cool, thank you! |
|
That makes sense. |
|
I haven't tested this PR with flet because I dont know how to build flet client, I only made something similar in flutter playground. |
|
OK, I found an issue with having both handlers |
|
I suggest explicitly implement |
|
I'm going to do this in the next update. Going to be a breaking change though. |
|
It is intended (in flutter) that I suggest refactor the API to directly expose flutter's It might be even better to implement a flet P.S.: Not only SRP, but also developer friendly. It is not easy to search in the docs and find out that flet supports (general) mouse event through |
|
Agree, implementing |
Use onTapDown instead of onTap like ink = False
Also:
passing a dummy callback to onTap when onHover is True to enble the widget instead of
passing a ws.pageEventFromWeb callback to onTap and onLongPress to reduce websocket traffic