draggable<T extends Object> method

Widget draggable<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. Axis? affinity,
  9. int? maxSimultaneousDrags,
  10. VoidCallback? onDragStarted,
  11. DragUpdateCallback? onDragUpdate,
  12. DraggableCanceledCallback? onDraggableCanceled,
  13. DragEndCallback? onDragEnd,
  14. VoidCallback? onDragCompleted,
  15. bool ignoringFeedbackSemantics = true,
  16. bool ignoringFeedbackPointer = true,
  17. bool rootOverlay = false,
  18. HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
  19. 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,
  );
}