@@ -39,9 +39,10 @@ typedef DragTargetAcceptWithDetails<T> = void Function(DragTargetDetails<T> deta
3939/// Signature for building children of a [DragTarget] .
4040///
4141/// The `candidateData` argument contains the list of drag data that is hovering
42- /// over this [DragTarget] and that has passed [DragTarget.onWillAccept] . The
43- /// `rejectedData` argument contains the list of drag data that is hovering over
44- /// this [DragTarget] and that will not be accepted by the [DragTarget] .
42+ /// over this [DragTarget] and that has passed
43+ /// [DragTarget.onWillAcceptWithDetails] . The `rejectedData` argument contains
44+ /// the list of drag data that is hovering over this [DragTarget] and that will
45+ /// not be accepted by the [DragTarget] .
4546///
4647/// Used by [DragTarget.builder] .
4748typedef DragTargetBuilder <T > = Widget Function (BuildContext context, List <T ?> candidateData, List <dynamic > rejectedData);
@@ -633,6 +634,20 @@ class DragTarget<T extends Object> extends StatefulWidget {
633634 ///
634635 /// The builder can build different widgets depending on what is being dragged
635636 /// into this drag target.
637+ ///
638+ /// [onWillAccept] or [onWillAcceptWithDetails] is called when a draggable
639+ /// enters the target. If true, then the data will appear in `candidateData` ,
640+ /// else in `rejectedData` .
641+ ///
642+ /// Typically the builder will check `candidateData` and `rejectedData` and
643+ /// build a widget that indicates the result of dropping the `candidateData`
644+ /// onto this target.
645+ ///
646+ /// The `candidateData` and `rejectedData` are [List] types to support multiple
647+ /// simultaneous drags.
648+ ///
649+ /// If unexpected `null` values in `candidateData` or `rejectedData` , ensure
650+ /// that the `data` argument of the [Draggable] is not `null` .
636651 final DragTargetBuilder <T > builder;
637652
638653 /// Called to determine whether this widget is interested in receiving a given
0 commit comments