createRecognizer method

  1. @override
DelayedMultiDragGestureRecognizer createRecognizer (GestureMultiDragStartCallback onStart)
override

Creates a gesture recognizer that recognizes the start of the drag.

Subclasses can override this function to customize when they start recognizing a drag.

Implementation

@override
DelayedMultiDragGestureRecognizer createRecognizer(GestureMultiDragStartCallback onStart) {
  return DelayedMultiDragGestureRecognizer()
    ..onStart = (Offset position) {
      final Drag result = onStart(position);
      if (result != null && hapticFeedbackOnStart)
        HapticFeedback.selectionClick();
      return result;
    };
}