longPressDraggable<T extends Object> method
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,
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,
);
}