builder property

DragTargetBuilder<T> builder
final

Called to build the contents of this widget.

The builder can build different widgets depending on what is being dragged into this drag target.

onWillAccept or onWillAcceptWithDetails is called when a draggable enters the target. If true, then the data will appear in candidateData, else in rejectedData.

Typically the builder will check candidateData and rejectedData and build a widget that indicates the result of dropping the candidateData onto this target.

The candidateData and rejectedData are List types to support multiple simultaneous drags.

If unexpected null values in candidateData or rejectedData, ensure that the data argument of the Draggable is not null.

Implementation

final DragTargetBuilder<T> builder;