deakjahn / flutter_dropzone

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

Please help with what properties does ev have #26

Closed arualana closed 3 years ago

arualana commented 3 years ago

I am looking at the documentatios

DropzoneView(
  operation: DragOperation.copy,
  cursor: CursorType.grab,
  onCreated: (ctrl) => controller = ctrl,
  onLoaded: () => print('Zone loaded'),
  onError: (ev) => print('Error: $ev'),
  onHover: () => print('Zone hovered'),
  onDrop: (ev) => print('Drop: $ev'),
  onLeave: () => print('Zone left'),
);

I need to know how to convert ev to PlatformFile

I don't know which properties ev has, please help

deakjahn commented 3 years ago

I added the types to the example. Regarding the file, please, go on reading the documentation. You cannot convert to PlatformFile, this is not possible in a browser. A Flutter Web app runs in a browser, so it can only do what the browser allows.

The Using the controller section describes how you can get the contents and metadata of the file.

arualana commented 3 years ago

Thank you