Add callbacks for detecting tap up events to TapRegion#156110
Add callbacks for detecting tap up events to TapRegion#156110auto-submit[bot] merged 6 commits intoflutter:masterfrom
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.
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.
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.
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.
Thanks! Fixed that now
|
@gspencergoog Would you mind being the secondary reviewer here since you already took a brief look before? |
|
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
///).