-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add callbacks for detecting tap up events to TapRegion #156110
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
|
I did consider renaming |
|
@gspencergoog Do you have any thoughts on this since you wrote TapRegion? I think it seems reasonable but I wonder if this goes with what you were imagining when you wrote it. |
|
This seems fine, and is along the lines of other events we have. It does make me wish I'd named it |
|
I'll leave the names as they are then. I just noticed that #155297 was merged recently. I should probably add the same |
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please add the check for isCurrent. Good catch!
Just a few nits and questions but I think this PR looks good overall. Thanks for your work on it!
This matches the behavior of `onTapOutside`.
720e19c to
277fc27
Compare
277fc27 to
357b015
Compare
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 . Thanks for the quick changes.
| /// | ||
| /// The event is the pointer event that caused the callback to be called. | ||
| /// Signature for a callback called for a [PointerDownEvent] relative to a [TapRegion]. | ||
| /// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I think the analyzer check is failing because here and below there is a trailing space at the end of the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed that now
|
@gspencergoog Would you mind being the secondary reviewer here since you already took a brief look before? |
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Congrats on the merge @Hannnes1, thank you for contributing! |
|
Thank you! And thanks for reviewing. |

Adds
onTapUpOutsideandonTapUpInsidecallbacks toTapRegion, andonTapUpOutsidetoEditableTexttext fields. This allows users to detectPointerUpEvents, which in turn can be used to differentiate between a tap and pan / scroll gesture (for example by comparing the distance between the down and up events).Fixes #140271 and potentially #138190
Pre-launch Checklist
///).