DragTarget<T extends Object> constructor
- Key? key,
- required DragTargetBuilder<
T> builder, - @Deprecated('Use onWillAcceptWithDetails instead. ' 'This callback is similar to onWillAcceptWithDetails but does not provide drag details. ' 'This feature was deprecated after v3.14.0-0.2.pre.') DragTargetWillAccept<
T> ? onWillAccept, - DragTargetWillAcceptWithDetails<
T> ? onWillAcceptWithDetails, - @Deprecated('Use onAcceptWithDetails instead. ' 'This callback is similar to onAcceptWithDetails but does not provide drag details. ' 'This feature was deprecated after v3.14.0-0.2.pre.') DragTargetAccept<
T> ? onAccept, - DragTargetAcceptWithDetails<
T> ? onAcceptWithDetails, - DragTargetLeave<
T> ? onLeave, - DragTargetMove<
T> ? onMove, - HitTestBehavior hitTestBehavior = HitTestBehavior.translucent,
Creates a widget that receives drags.
Implementation
const DragTarget({
super.key,
required this.builder,
@Deprecated(
'Use onWillAcceptWithDetails instead. '
'This callback is similar to onWillAcceptWithDetails but does not provide drag details. '
'This feature was deprecated after v3.14.0-0.2.pre.'
)
this.onWillAccept,
this.onWillAcceptWithDetails,
@Deprecated(
'Use onAcceptWithDetails instead. '
'This callback is similar to onAcceptWithDetails but does not provide drag details. '
'This feature was deprecated after v3.14.0-0.2.pre.'
)
this.onAccept,
this.onAcceptWithDetails,
this.onLeave,
this.onMove,
this.hitTestBehavior = HitTestBehavior.translucent,
}) : assert(onWillAccept == null || onWillAcceptWithDetails == null, "Don't pass both onWillAccept and onWillAcceptWithDetails.");