GesturePatternRecognizer constructor

GesturePatternRecognizer({
  1. required GesturePattern pattern,
  2. required Duration timeout,
  3. required VoidCallback onPatternMatched,
})

Creates a GesturePatternRecognizer with the given pattern, timeout, and onPatternMatched callback.

pattern is the sequence of gestures to recognize. timeout is the duration within which the pattern should be completed. onPatternMatched is the callback to be invoked when the pattern is matched.

Implementation

GesturePatternRecognizer({
  required this.pattern,
  required this.timeout,
  required this.onPatternMatched,
}) {
  _gestureSequence = pattern.pattern;
}