To apply the Drag & Drop function to multiple windows in a desktop environment(macOS, Windows),
I applied the DropRegion from the super_drag_and_drop package to the example in the desktop_multi_window package, but the Drop function does not work properly, with the following error occurring occasionally.
What should I do? Please help me.
Error message
[super_native_extensions::drop_manager] DropContext already exists for isolate IsolateId
Example
The DropRegion class was applied to the desktop_multi_window example program as follows.
https://github.com/MixinNetwork/flutter-plugins/blob/main/packages/desktop_multi_window/example/lib/windows/main_window.dart
class _ExampleMainWindowState extends State<ExampleMainWindow> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: DropRegion(
// Formats this region can accept.
formats: Formats.standardFormats,
hitTestBehavior: HitTestBehavior.opaque,
onDropOver: (event) {
print("===========> Main Window : onDropOver.........");
return event.session.allowedOperations.firstOrNull ?? DropOperation.none;
},
onPerformDrop: (event) async {
print("===========> Main Window : onPerformDrop.........");
},
child: Scaffold(
...
https://github.com/MixinNetwork/flutter-plugins/blob/main/packages/desktop_multi_window/example/lib/windows/sample_window.dart
class SampleWindow extends StatelessWidget {
const SampleWindow({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: DropRegion(
// Formats this region can accept.
formats: Formats.standardFormats,
hitTestBehavior: HitTestBehavior.opaque,
onDropOver: (event) {
print("===========> Sample !!!! : onDropOver.........");
return event.session.allowedOperations.firstOrNull ?? DropOperation.none;
},
onPerformDrop: (event) async {
print("===========> Sample !!!! : onPerformDrop.........");
},
child: Scaffold(
...
To apply the Drag & Drop function to multiple windows in a desktop environment(macOS, Windows),
I applied the DropRegion from the super_drag_and_drop package to the example in the desktop_multi_window package, but the Drop function does not work properly, with the following error occurring occasionally.
What should I do? Please help me.
Error message
[super_native_extensions::drop_manager] DropContext already exists for isolate IsolateId
Example
The DropRegion class was applied to the desktop_multi_window example program as follows.
https://github.com/MixinNetwork/flutter-plugins/blob/main/packages/desktop_multi_window/example/lib/windows/main_window.dart
https://github.com/MixinNetwork/flutter-plugins/blob/main/packages/desktop_multi_window/example/lib/windows/sample_window.dart