[英]Flutter drag and drop inside UI in desktop application
Talking about a desktop application now, not mobile or web.现在谈论桌面应用程序,而不是移动或 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? Flutter
中的任何小部件是否允许,例如,将文件夹拖放到应用程序 UI 中,然后应用程序将读取该文件或文件夹的路径?
I have been reading about Draggable
and DragTarget
in Flutter
, but i do think they are used for that purpose.我一直在阅读 Flutter 中有关
Draggable
和DragTarget
的Flutter
,但我确实认为它们是用于此目的。
NOTE: it might not exist a widget for that purpose, so a strategy on how to do that in Flutter will also be appreciated.注意:它可能不存在用于该目的的小部件,因此在 Flutter 中如何做到这一点的策略也将受到赞赏。
Assuming you're talking about dragging from outside the application, it's not currently supported;假设您正在谈论从应用程序外部拖动,目前不支持; Flutter #30719 would be the issue to watch/upvote.
Flutter #30719将是观看/投票的问题。
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.根据具体的平台,您可能能够在短期内使用插件来实现它(如果您熟悉该平台上的原生开发),但这可能比为 Flutter 本身贡献实现更多的工作。
Flutter has a dependency to support such behavior now. Flutter 现在有一个依赖项来支持这种行为。 Check this link https://pub.dev/packages/desktop_drop
检查此链接https://pub.dev/packages/desktop_drop
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.