Draggable<T> constructor

const Draggable<T>(
  1. {Key key,
  2. @required Widget child,
  3. @required Widget feedback,
  4. T data,
  5. Axis axis,
  6. Widget childWhenDragging,
  7. Offset feedbackOffset: Offset.zero,
  8. DragAnchor dragAnchor: DragAnchor.child,
  9. Axis affinity,
  10. int maxSimultaneousDrags,
  11. VoidCallback onDragStarted,
  12. DraggableCanceledCallback onDraggableCanceled,
  13. DragEndCallback onDragEnd,
  14. VoidCallback onDragCompleted,
  15. bool ignoringFeedbackSemantics: true}
)

Creates a widget that can be dragged to a DragTarget.

The child and feedback arguments must not be null. If maxSimultaneousDrags is non-null, it must be non-negative.

Implementation

const Draggable({
  Key key,
  @required this.child,
  @required this.feedback,
  this.data,
  this.axis,
  this.childWhenDragging,
  this.feedbackOffset = Offset.zero,
  this.dragAnchor = DragAnchor.child,
  this.affinity,
  this.maxSimultaneousDrags,
  this.onDragStarted,
  this.onDraggableCanceled,
  this.onDragEnd,
  this.onDragCompleted,
  this.ignoringFeedbackSemantics = true,
}) : assert(child != null),
     assert(feedback != null),
     assert(ignoringFeedbackSemantics != null),
     assert(maxSimultaneousDrags == null || maxSimultaneousDrags >= 0),
     super(key: key);