DragGestureRecognizer constructor

DragGestureRecognizer(
  1. {Object? debugOwner,
  2. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  3. GestureVelocityTrackerBuilder velocityTrackerBuilder = _defaultBuilder,
  4. bool onlyAcceptDragOnThreshold = false,
  5. Set<PointerDeviceKind>? supportedDevices,
  6. AllowedButtonsFilter? allowedButtonsFilter}
)

Initialize the object.

dragStartBehavior must not be null.

It's possible to limit this recognizer to a specific set of PointerDeviceKinds by providing the optional supportedDevices argument. If supportedDevices is null, the recognizer will accept pointer events from all device kinds.

Implementation

DragGestureRecognizer({
  super.debugOwner,
  this.dragStartBehavior = DragStartBehavior.start,
  this.velocityTrackerBuilder = _defaultBuilder,
  this.onlyAcceptDragOnThreshold = false,
  super.supportedDevices,
  AllowedButtonsFilter? allowedButtonsFilter,
}) : super(allowedButtonsFilter: allowedButtonsFilter ?? _defaultButtonAcceptBehavior);