GesturePatternRecognizer class

Core class to recognize a gesture pattern based on a Morse code-like string.

This class processes gestures and matches them against a predefined sequence of gestures (pattern). If the gestures match the pattern within the specified timeout, the onPatternMatched callback is invoked.

Constructors

GesturePatternRecognizer({required GesturePattern pattern, required Duration timeout, required VoidCallback onPatternMatched})
Creates a GesturePatternRecognizer with the given pattern, timeout, and onPatternMatched callback.

Properties

hashCode → int
The hash code for this object.
no setterinherited
onPatternMatched → VoidCallback
The callback to be invoked when the pattern is successfully matched.
final
pattern → GesturePattern
The gesture pattern to recognize.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
The duration within which the pattern must be completed.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processGesture(GestureType gesture) → void
Processes an incoming gesture and matches it against the pattern sequence.
resetPattern() → void
Resets the pattern matching process and cancels the current timer.
toString() → String
A string representation of this object.
inherited

Operators

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