Draggable({Key key, @required Widget child, @required Widget feedback, T data, Widget childWhenDragging, Offset feedbackOffset: Offset.zero, DragAnchor dragAnchor: DragAnchor.child, Axis affinity, int maxSimultaneousDrags, VoidCallback onDragStarted, DraggableCanceledCallback onDraggableCanceled })

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.

Source

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