LongPressDraggable<T extends Object> constructor

const LongPressDraggable<T extends Object>({
  1. Key? key,
  2. required Widget child,
  3. required Widget feedback,
  4. T? data,
  5. Axis? axis,
  6. Widget? childWhenDragging,
  7. Offset feedbackOffset = Offset.zero,
  8. DragAnchorStrategy dragAnchorStrategy = childDragAnchorStrategy,
  9. int? maxSimultaneousDrags,
  10. VoidCallback? onDragStarted,
  11. DragUpdateCallback? onDragUpdate,
  12. DraggableCanceledCallback? onDraggableCanceled,
  13. DragEndCallback? onDragEnd,
  14. VoidCallback? onDragCompleted,
  15. bool hapticFeedbackOnStart = true,
  16. bool ignoringFeedbackSemantics = true,
  17. bool ignoringFeedbackPointer = true,
  18. Duration delay = kLongPressTimeout,
  19. AllowedButtonsFilter? allowedButtonsFilter,
  20. HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
  21. bool rootOverlay = false,
})

Creates a widget that can be dragged starting from long press.

If maxSimultaneousDrags is non-null, it must be non-negative.

Implementation

const LongPressDraggable({
  super.key,
  required super.child,
  required super.feedback,
  super.data,
  super.axis,
  super.childWhenDragging,
  super.feedbackOffset,
  super.dragAnchorStrategy,
  super.maxSimultaneousDrags,
  super.onDragStarted,
  super.onDragUpdate,
  super.onDraggableCanceled,
  super.onDragEnd,
  super.onDragCompleted,
  this.hapticFeedbackOnStart = true,
  super.ignoringFeedbackSemantics,
  super.ignoringFeedbackPointer,
  this.delay = kLongPressTimeout,
  super.allowedButtonsFilter,
  super.hitTestBehavior,
  super.rootOverlay,
});