file_drag_and_drop

Last updated:

0 purchases

file_drag_and_drop Image
file_drag_and_drop Images
Add to Cart

Description:

file drag and drop

FileDragAndDrop #
A flutter deskstop package that allows you to drag the native file into app support.

Platform Support #
Now only support on macOS, if any one can implements other platform method. Please pull request to contributors



Linux
macOS
Windows





✔️




Example #
See Example Code
Firt Step: ensureInitialized
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dragAndDropChannel.initializedMainView();
runApp(MyApp());
}
copied to clipboard
Second Step: addListener DragContainerListener
@override
void draggingFileEntered() {
print("flutter: draggingFileEntered");
setState(() {
visibilityTips = true;
});
}

@override
void draggingFileExit() {
print("flutter: draggingFileExit");
setState(() {
visibilityTips = false;
});
}

@override
void prepareForDragFileOperation() {
print("flutter: prepareForDragFileOperation");
setState(() {
visibilityTips = false;
});
}

@override
void performDragFileOperation(List<DragFileResult> fileResults) {
print("flutter: performDragFileOperation");
setState(() {
this.fileResults = fileResults;
});
}
copied to clipboard
Getting Started #
This project is a starting point for a Flutter
plug-in package,
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.