TapGestureRecognizer class
Recognizes single-tap gestures.
A tap is defined as a pointer-down followed by a pointer-up within kTouchSlop cells of movement. If the pointer moves beyond the slop before release, the tap is cancelled.
- Inheritance
-
- Object
- GestureRecognizer
- TapGestureRecognizer
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialPosition ↔ Offset?
-
Position where the pointer first went down.
getter/setter pairinherited
- onTap ↔ GestureTapCallback?
-
Callback fired after a successful tap (down + up within slop).
getter/setter pair
- onTapCancel ↔ GestureTapCancelCallback?
-
Callback fired when the tap is cancelled (pointer moved beyond slop).
getter/setter pair
- onTapDown ↔ GestureTapDownCallback?
-
Callback fired when the pointer goes down.
getter/setter pair
- onTapUp ↔ GestureTapUpCallback?
-
Callback fired when the pointer goes up (within slop).
getter/setter pair
-
pendingCmds
→ List<
Cmd> -
Commands accumulated from callbacks during the current event.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ GestureRecognizerState
-
Current lifecycle state.
getter/setter pairinherited
Methods
-
acceptGesture(
) → void -
Called when this recognizer wins the arena.
override
-
addCmd(
Cmd? cmd) → void -
Adds a command to pendingCmds if non-null.
inherited
-
dispose(
) → void -
Cleans up resources. Called when the recognizer is no longer needed.
inherited
-
handlePointerDown(
MouseMsg event, Offset localPosition) → void -
Called when a pointer-down event occurs.
override
-
handlePointerMove(
MouseMsg event, Offset localPosition) → void -
Called when a pointer-move event occurs.
override
-
handlePointerUp(
MouseMsg event, Offset localPosition) → void -
Called when a pointer-up event occurs.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rejectGesture(
) → void -
Called when this recognizer loses the arena.
override
-
reset(
) → void -
Resets the recognizer to GestureRecognizerState.ready.
override
-
resolve(
GestureDisposition disposition) → void -
Requests acceptance or rejection from the arena.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- kTouchSlop → const double
- Maximum distance in cells the pointer can move before the tap is cancelled.