LongPressDraggable<T extends Object> constructor
- Key? key,
- required Widget child,
- required Widget feedback,
- 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,
- HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
- 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,
});