longPressDraggable<T extends Object> method

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

Makes its child draggable starting from long press.

Implementation

Widget longPressDraggable<T extends Object>({
  required Widget feedback,
  Key? key,
  T? data,
  Axis? axis,
  Widget? childWhenDragging,
  Offset feedbackOffset = Offset.zero,
  DragAnchorStrategy dragAnchorStrategy = childDragAnchorStrategy,
  int? maxSimultaneousDrags,
  VoidCallback? onDragStarted,
  DragUpdateCallback? onDragUpdate,
  DraggableCanceledCallback? onDraggableCanceled,
  DragEndCallback? onDragEnd,
  VoidCallback? onDragCompleted,
  bool hapticFeedbackOnStart = true,
  bool ignoringFeedbackSemantics = true,
  bool ignoringFeedbackPointer = true,
  Duration delay = kLongPressTimeout,
  AllowedButtonsFilter? allowedButtonsFilter,
}) {
  return LongPressDraggable<T>(
    key: key,
    feedback: feedback,
    data: data,
    axis: axis,
    childWhenDragging: childWhenDragging,
    feedbackOffset: feedbackOffset,
    dragAnchorStrategy: dragAnchorStrategy,
    maxSimultaneousDrags: maxSimultaneousDrags,
    onDragStarted: onDragStarted,
    onDragUpdate: onDragUpdate,
    onDraggableCanceled: onDraggableCanceled,
    onDragEnd: onDragEnd,
    onDragCompleted: onDragCompleted,
    hapticFeedbackOnStart: hapticFeedbackOnStart,
    ignoringFeedbackSemantics: ignoringFeedbackSemantics,
    ignoringFeedbackPointer: ignoringFeedbackPointer,
    delay: delay,
    allowedButtonsFilter: allowedButtonsFilter,
    child: this,
  );
}