You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written some code to drag/drop files which works on MacOS but fails on Linux. The code which handles the drop is:
Future<void> onPerformDrop(PerformDropEvent event) async {
if (event.session.items.isNotEmpty) {
for (var item in event.session.items) {
final reader = item.dataReader!;
if (reader.canProvide(Formats.fileUri)) {
reader.getValue(Formats.fileUri, (uri) async {
if (uri != null) {
Uri toFileUri = Uri.parse('${destination.uri}${basename(Uri.decodeComponent(uri.path))}');
// do stuff with the dropped file.
};
}
});
}
}
}
}
On linux, the reader.getValue function appears to provide a null URI even though the supported formats indicate that text/uri-list is acceptable:
Hi,
I have written some code to drag/drop files which works on MacOS but fails on Linux. The code which handles the drop is:
On linux, the reader.getValue function appears to provide a null URI even though the supported formats indicate that text/uri-list is acceptable:
An ideas what I am doing wrong please?
Cheers,
David
The text was updated successfully, but these errors were encountered: