DragTarget<T extends Object> constructor Null safety

const DragTarget<T extends Object>(
  1. {Key? key,
  2. required DragTargetBuilder<T> builder,
  3. DragTargetWillAccept<T>? onWillAccept,
  4. DragTargetAccept<T>? onAccept,
  5. DragTargetAcceptWithDetails<T>? onAcceptWithDetails,
  6. DragTargetLeave<T>? onLeave,
  7. DragTargetMove<T>? onMove,
  8. HitTestBehavior hitTestBehavior}
)

Creates a widget that receives drags.

The builder argument must not be null.

Implementation

const DragTarget({
  Key? key,
  required this.builder,
  this.onWillAccept,
  this.onAccept,
  this.onAcceptWithDetails,
  this.onLeave,
  this.onMove,
  this.hitTestBehavior = HitTestBehavior.translucent,
}) : super(key: key);