deakjahn / flutter_dropzone

A drag-and-drop Flutter plugin (Web). Only web and only from outside into Flutter.
https://pub.dev/packages/flutter_dropzone
85 stars 36 forks source link

Issue with multiple DropzoneView widgets on same page #55

Open sunilguptasg opened 2 years ago

sunilguptasg commented 2 years ago

I have a form with multiple video and image fields (in this case two video and one image). All have the DropzoneView in a Stack.

The videos are in iFrames.

I get several errors:

1> The image does not display, just the videos. If I remove one of the video widget, the image is rendered.

2> In any case, when I push a camera widget and pop back I get errors like this: ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ The following IndexError was thrown during a scheduler callback: RangeError (index): Index out of range: index must not be negative: -1

Can you help identify the issue?

deakjahn commented 2 years ago

If you could come up with a simple reproducible code, I could try it. :-)

sunilguptasg commented 2 years ago

deakjahn - the code was really too complex for me to send in a testable form without significant effort. What I did was replace this with DropZone (https://pub.dev/packages/drop_zone) and got things working.

Fundamentally, multiple DropzoneView with iFrames on a page, then a navigator.push to a camera page, then pop, and the exception occurs.

I still use DropzoneView, but NOT for drag/drop - incidentally this component (when stacked on top of an iFrame) blocks clicks to be sent to the iFrame, so when I need this functionality, I add this to the stack on top of my iFrames.

Perhaps you can extract just that portion and make it available as a widget - there are a lot of people looking for this capability.

sgehrman commented 2 years ago

same issue. It only happens in canvasKit rendering. try that

tf0054 commented 1 year ago

Im using flutter 3.3, have multiple DropzoneView and might have issues related this which are like,

Guessing its related to canvaskit? though the issues are there if I build with --web-render html