createRecognizer method

  1. @protected
MultiDragGestureRecognizer createRecognizer(
  1. GestureMultiDragStartCallback onStart
)

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

@protected
MultiDragGestureRecognizer createRecognizer(GestureMultiDragStartCallback onStart) {
  return switch (affinity) {
    Axis.horizontal => HorizontalMultiDragGestureRecognizer(allowedButtonsFilter: allowedButtonsFilter),
    Axis.vertical   => VerticalMultiDragGestureRecognizer(allowedButtonsFilter: allowedButtonsFilter),
    null            => ImmediateMultiDragGestureRecognizer(allowedButtonsFilter: allowedButtonsFilter),
  }..onStart = onStart;
}