go-flutter-desktop / go-flutter

Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.
https://hover.build/
BSD 3-Clause "New" or "Revised" License
5.84k stars 286 forks source link

Native file Drag drop from flutter application to non flutter application #652

Closed beatscode closed 2 years ago

beatscode commented 2 years ago

I would like to be able to drag a file (pointer to file) from a flutter application to a non flutter application. Electron has the following example. https://www.electronjs.org/docs/latest/tutorial/native-file-drag-drop I'm wondering if flutter has this as well. I've seen https://pub.dev/packages/desktop_drop which seems to allow drag/drop files into flutter app but not the other way around.

pchampio commented 2 years ago

You need to build a GLFW plugin for that: https://github.com/go-flutter-desktop/go-flutter/wiki/GLFW-Plugin-example https://github.com/go-flutter-desktop/go-flutter/wiki/Implement-a-plugin

Watch for the cursor hold / leave window event. To send platform specific functions.