LongPressDraggable<T extends Object> constructor
Null safety
- {Key? key,
- required Widget child,
- required Widget feedback,
- T? data,
- Axis? axis,
- Widget? childWhenDragging,
- Offset feedbackOffset = Offset.zero,
- @Deprecated('Use dragAnchorStrategy instead. ' 'Replace "dragAnchor: DragAnchor.child" with "dragAnchorStrategy: childDragAnchorStrategy". ' 'Replace "dragAnchor: DragAnchor.pointer" with "dragAnchorStrategy: pointerDragAnchorStrategy". ' 'This feature was deprecated after v2.1.0-10.0.pre.') DragAnchor dragAnchor = DragAnchor.child,
- DragAnchorStrategy? dragAnchorStrategy,
- int? maxSimultaneousDrags,
- VoidCallback? onDragStarted,
- DragUpdateCallback? onDragUpdate,
- DraggableCanceledCallback? onDraggableCanceled,
- DragEndCallback? onDragEnd,
- VoidCallback? onDragCompleted,
- bool hapticFeedbackOnStart = true,
- bool ignoringFeedbackSemantics = true,
- bool ignoringFeedbackPointer = true,
- Duration delay = kLongPressTimeout}
Creates a widget that can be dragged starting from long press.
The child and feedback arguments must not be null. 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,
@Deprecated(
'Use dragAnchorStrategy instead. '
'Replace "dragAnchor: DragAnchor.child" with "dragAnchorStrategy: childDragAnchorStrategy". '
'Replace "dragAnchor: DragAnchor.pointer" with "dragAnchorStrategy: pointerDragAnchorStrategy". '
'This feature was deprecated after v2.1.0-10.0.pre.',
)
super.dragAnchor,
super.dragAnchorStrategy,
super.maxSimultaneousDrags,
super.onDragStarted,
super.onDragUpdate,
super.onDraggableCanceled,
super.onDragEnd,
super.onDragCompleted,
this.hapticFeedbackOnStart = true,
super.ignoringFeedbackSemantics,
super.ignoringFeedbackPointer,
this.delay = kLongPressTimeout,
});