super_drag_and_drop library

Classes

BaseDraggableWidget
This is the most basic draggable widget. It gives you complete control over creating of the drag session.
CustomValueFormat<T extends Object>
DataFormat<T extends Object>
Base class for formats of data transferred to clipboard and drag & drop. This branches into ValueFormat for data values that need to be converted from and to platform specific formats (such as plain text, HTML snippet, uri) and FileFormat representing files that are processed without conversion (i.e. PNG, JPEG).
DisplayWidgetSnapshot
DragConfiguration
Initial configuration of a drag session.
DragConfigurationItem
Single item of DragConfiguration consisting of drag item and corresponding image.
DraggableWidget
Widget that represents user-draggable area. By default the widget will look for DragItemWidget in parent widget hierarchy in order to provide data for the drag session.
DragItem
Represent single item being dragged in a DragSession.
DragItemRequest
DragItemWidget
Widget that provides DragItem for a DraggableWidget.
DragItemWidgetState
DragOptions
Additional options for drag session.
DragSession
Represents a drag session. Allows inspecting local drag data and provides notifications about drag state changes.
DropEvent
Base drop event containing only DropSession with no additional information.
DropItem
Single item being dropped in a DropSession.
DropItemPreview
DropItemPreviewRequest
Requests for providing target preview for item being dropped.
DropMonitor
Widget that can monitor drag events over the entire Flutter view.
DropOverEvent
Drop event sent when dragging over DropRegion before the drop.
DropPosition
Position for drop event.
DropRegion
Widget to which data can be dropped.
DropSession
Allows querying the state of drop session such as the items being dropped and allowed drop operations.
EncodedData
Clipboard data in platform specific format. Do not use directly.
FileFormat
Base format class for files that are in standardized formats and processed without conversion (i.e. PNG, JPEG).
Formats
MonitorDropOverEvent
Event sent to DropMonitors when dragging anywhere over the application.
NamedUri
PerformDropEvent
Drop event sent when user performs drop.
PlatformCodec<T extends Object>
Platform specific codec for a data format.
PlatformDataProvider
SnapshotSettings
Wrapper widget that allows customizing snapshot settings.
TargetedWidgetSnapshot
Image representation of part of user interface.
ValueFormat<T extends Object>
Format for values that need to be converted from and to platform specific formats (such as plain text, HTML snippet, uri).
WidgetSnapshot
Represents a snapshot of widget.
WidgetSnapshotter
WidgetSnapshotterState

Enums

DropOperation
Represents result of a drag & drop operation.
RenderObjectType
Type of render object produced by DropRegion and RenderDropMonitor.

Extensions

DevicePixelRatio on Image
Extension on image that allows to store device pixel ratio alongside the image itself.

Typedefs

AdditionalItemsProvider = Future<List<DragConfigurationItem>?> Function(Offset position, DragSession session)
DataProvider<T> = FutureOr<T> Function()
Callback to obtain data lazily. See DataFormat.lazy;
DragConfigurationProvider = Future<DragConfiguration?> Function(Offset position, DragSession session)
DragItemProvider = FutureOr<DragItem?> Function(DragItemRequest)
DragItemsProvider = List<DragItemWidgetState> Function(BuildContext context)
LocationIsDraggable = bool Function(Offset position)
OnAdditonalItems = FutureOr<List<DragConfigurationItem>?> Function(List<DragConfigurationItem> items, DragSession session)
OnDragConfiguration = FutureOr<DragConfiguration?> Function(DragConfiguration configuration, DragSession session)
OnGetDropItemPreview = FutureOr<DropItemPreview?> Function(DropSession session, DropItemPreviewRequest request)
Allows customizing drop animation on macOS and iOS.
PlatformFormat = String
Platform specific name for data format. For example value for plain text for macOS and iOS would be 'public.utf8-plain-text', for android, Linux and web 'text/plain' and for windows 'NativeShell_CF_13', which maps to CF_UNICODETEXT (value of 13).
Translation = Offset Function(Rect rect, Offset dragPosition)