GestureRecognizer class abstract

Abstract base class for all gesture recognizers.

A recognizer receives pointer events and decides whether the sequence matches its gesture. It participates in a GestureArenaManager to resolve conflicts with other recognizers.

Recognizer callbacks return Cmd? to fit the TEA architecture. The pendingCmds list collects all commands produced during a pointer event so the owning widget can batch them.

Constructors

GestureRecognizer()

Properties

hashCode int
The hash code for this object.
no setterinherited
initialPosition Offset?
Position where the pointer first went down.
getter/setter pair
pendingCmds List<Cmd>
Commands accumulated from callbacks during the current event.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state GestureRecognizerState
Current lifecycle state.
getter/setter pair

Methods

acceptGesture() → void
Called when this recognizer wins the arena.
addCmd(Cmd? cmd) → void
Adds a command to pendingCmds if non-null.
dispose() → void
Cleans up resources. Called when the recognizer is no longer needed.
handlePointerDown(MouseMsg event, Offset localPosition) → void
Called when a pointer-down event occurs.
handlePointerMove(MouseMsg event, Offset localPosition) → void
Called when a pointer-move event occurs.
handlePointerUp(MouseMsg event, Offset localPosition) → void
Called when a pointer-up event occurs.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rejectGesture() → void
Called when this recognizer loses the arena.
reset() → void
Resets the recognizer to GestureRecognizerState.ready.
resolve(GestureDisposition disposition) → void
Requests acceptance or rejection from the arena.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited