ui/drag_and_drop/drag_target library
Classes
-
Draggable<
T extends Object> - A widget that can be dragged from to a DragTarget.
- DraggableDetails
- Represents the details when a specific pointer event occurred on the Draggable.
-
DragTarget<
T extends Object> - A widget that receives data when a Draggable widget is dropped.
-
DragTargetDetails<
T> - Represents the details when a pointer event occurred on the DragTarget.
-
LongPressDraggable<
T extends Object> - Makes its child draggable starting from long press.
Functions
-
childDragAnchorStrategy(
Draggable< Object> draggable, BuildContext context, Offset position) → Offset - Display the feedback anchored at the position of the original child.
-
pointerDragAnchorStrategy(
Draggable< Object> draggable, BuildContext context, Offset position) → Offset - Display the feedback anchored at the position of the touch that started the drag.
Typedefs
-
DragAnchorStrategy
= Offset Function(Draggable<
Object> draggable, BuildContext context, Offset position) - Signature for the strategy that determines the drag start point of a Draggable.
- DragEndCallback = void Function(DraggableDetails details)
- Signature for when the draggable is dropped.
- DraggableCanceledCallback = void Function(Velocity velocity, Offset offset)
- Signature for when a Draggable is dropped without being accepted by a DragTarget.
-
DragTargetAccept<
T> = void Function(T data) - Signature for causing a DragTarget to accept the given data.
-
DragTargetAcceptWithDetails<
T> = void Function(DragTargetDetails< T> details) - Signature for determining information about the acceptance by a DragTarget.
-
DragTargetBuilder<
T> = Widget Function(BuildContext context, List< T?> candidateData, List rejectedData) - Signature for building children of a DragTarget.
-
DragTargetLeave<
T> = void Function(T? data) - Signature for when a Draggable leaves a DragTarget.
-
DragTargetMove<
T> = void Function(DragTargetDetails< T> details) - Signature for when a Draggable moves within a DragTarget.
-
DragTargetWillAccept<
T> = bool Function(T? data) - Signature for determining whether the given data will be accepted by a DragTarget.
- DragUpdateCallback = void Function(DragUpdateDetails details)
- Signature for when a Draggable is dragged across the screen.