draggable<T extends Object> method
Widget
draggable<T extends Object>({
- required Widget feedback,
- Key? key,
- T? data,
- Axis? axis,
- Widget? childWhenDragging,
- Offset feedbackOffset = Offset.zero,
- DragAnchorStrategy dragAnchorStrategy = childDragAnchorStrategy,
- Axis? affinity,
- int? maxSimultaneousDrags,
- VoidCallback? onDragStarted,
- DragUpdateCallback? onDragUpdate,
- DraggableCanceledCallback? onDraggableCanceled,
- DragEndCallback? onDragEnd,
- VoidCallback? onDragCompleted,
- bool ignoringFeedbackSemantics = true,
- bool ignoringFeedbackPointer = true,
- bool rootOverlay = false,
- HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
- AllowedButtonsFilter? allowedButtonsFilter,
A widget that can be dragged from to a DragTarget.
Implementation
Widget draggable<T extends Object>({
required Widget feedback,
Key? key,
T? data,
Axis? axis,
Widget? childWhenDragging,
Offset feedbackOffset = Offset.zero,
DragAnchorStrategy dragAnchorStrategy = childDragAnchorStrategy,
Axis? affinity,
int? maxSimultaneousDrags,
VoidCallback? onDragStarted,
DragUpdateCallback? onDragUpdate,
DraggableCanceledCallback? onDraggableCanceled,
DragEndCallback? onDragEnd,
VoidCallback? onDragCompleted,
bool ignoringFeedbackSemantics = true,
bool ignoringFeedbackPointer = true,
bool rootOverlay = false,
HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
AllowedButtonsFilter? allowedButtonsFilter,
}) {
return Draggable<T>(
key: key,
feedback: feedback,
data: data,
axis: axis,
childWhenDragging: childWhenDragging,
feedbackOffset: feedbackOffset,
dragAnchorStrategy: dragAnchorStrategy,
affinity: affinity,
maxSimultaneousDrags: maxSimultaneousDrags,
onDragStarted: onDragStarted,
onDragUpdate: onDragUpdate,
onDraggableCanceled: onDraggableCanceled,
onDragEnd: onDragEnd,
onDragCompleted: onDragCompleted,
ignoringFeedbackSemantics: ignoringFeedbackSemantics,
ignoringFeedbackPointer: ignoringFeedbackPointer,
rootOverlay: rootOverlay,
hitTestBehavior: hitTestBehavior,
allowedButtonsFilter: allowedButtonsFilter,
child: this,
);
}