6

Talking about a desktop application now, not mobile or web.

Is it any widget in Flutter that will allow, for example, drag a folder, drop it in the application UI, and the app will read for example the path to that file or folder?

I have been reading about Draggable and DragTarget in Flutter, but i do think they are used for that purpose.

NOTE: it might not exist a widget for that purpose, so a strategy on how to do that in Flutter will also be appreciated.

codeKiller
  • 5,493
  • 17
  • 60
  • 115
  • 2
    you might want to follow this issue https://github.com/flutter/flutter/issues/30719 and i am pretty much sure we have to wait for an year at least for the answer. – Sahdeep Singh Oct 11 '19 at 12:01

2 Answers2

9

Assuming you're talking about dragging from outside the application, it's not currently supported; Flutter #30719 would be the issue to watch/upvote.

Depending on the specific platform you might be able to implement it with a plugin in the short term (if you are familiar with native development on that platform), but that would likely be more work than contributing an implementation to Flutter itself.

smorgan
  • 20,228
  • 3
  • 47
  • 55
3

Flutter has a dependency to support such behavior now. Check this link https://pub.dev/packages/desktop_drop

Shareef Dweikat
  • 361
  • 2
  • 13
  • Do you maybe know of there's plans for OLE support? https://learn.microsoft.com/en-us/cpp/mfc/drag-and-drop-ole?view=msvc-170 – BananaMaster Jul 11 '22 at 20:08