flutter_native_drag_n_drop library
Classes
- DragBeginEvent
- Event object when drag has started
- DragEndedEvent
- Event object when drag has ended
- DragEvent
- Base class for drag events, mainly used by NativeDraggable
- DraggableState
- DragMovedEvent
- Event object when drag has moved
- DropDoneDetails
- An object that contains metadata when the drag is done
- DropDoneEvent
- Event object when drop has finished
- DropEnterEvent
- Event object when drop has entered the drop target area
- DropEvent
- Base class for drop events, mainly used by NativeDropTarget
- DropEventDetails
- An object that contains metadata when the drag is done
- DropExitEvent
- Event object when drag has exited the drop target area
- DropUpdateEvent
- Event object when drag has moved on a drop target
- FileStreamEvent
- Event object which is fired when native layer needs the fileStream to write the file
- FlutterNativeDragNDrop
- Main communication between the Dart- and native-layer
-
NativeDragFileItem<
T extends Object> - NativeDragFileItem is used for files, especially when you want to support the drag and drop outside of the application (e.g file to Finder or Mail client)
- NativeDraggable
- A widget that can be dragged from to a NativeDragTarget.
-
NativeDragItem<
T extends Object> -
NativeDragItems
is used for when you just drag and drop within the application (e.g folder, image) - NativeDropTarget
- A widget that accepts draggable files.
- ProgressController
- An object where you have to pass the current progress of the fileStream in bytes. The system use the progress to update the progress indicator in the filesystem manager(e.g. Finder on macOS)
Typedefs
- DragEventListener = void Function(DragEvent event)
-
DragTargetWillAccept<
T extends Object> = bool Function(List< NativeDragItem< items)Object> > -
FileStreamCallback
= Stream<
Uint8List> Function(NativeDragFileItem<Object> item, String fileName, String url, ProgressController progressController) - Callback which is called when the native layer needs the file bytes
-
OnDragCallback<
Detail> = void Function(Detail details) - OnDragDoneCallback = void Function(DropDoneDetails details)
- OnDragUpdateCallback = void Function(DragEvent event)
- RawDropListener = void Function(DropEvent)
- UniqueKeyString = String