It simply opens the usual File Open dialog There is a convenience function, pickFiles() on the controller returned by the view. Release it when you're done with the image. It's a regular URL, so you can use it to display the image the same way like loadingįrom a regular web URL. Future createFileUrl(dynamic htmlFile) īut this will only be valid for the session.To get the actual contents and store it yourself into localStorage, IndexedDB, uploading to your server, whatever. If you need to retain the full file data, use getFileData() You can't have a permanent link to the file (and no file path, either). Stream> getFileStream(dynamic htmlFile).Future getFileLastModified(dynamic htmlFile).They are returned as dynamic objects and the controller has functions to extract information from these objects: Use a Stack to put it into the background of other widgets thatīecause the files returned are HTML File API references with serious limitations, they can't be converted to regular Dartįile objects. The view itself has no display, it's just the dropzone area. OnDropMultiple: (List ev) => print('Drop multiple: $ev'), OnDrop: (dynamic ev) => print('Drop: $ev'), OnError: (String? ev) => print('Error: $ev'), OnCreated: (DropzoneViewController ctrl) => controller = ctrl, It exposes a single platform view, DropzoneView: DropzoneView( If you're interested in drag-and-drop inside a Flutter app, check out other packages like dnd. A Flutter Web plugin to handle drag-and-drop (files) into Flutter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |