Update README.md

Updates click event call order
This commit is contained in:
Miguel Ruivo 2020-06-22 17:16:56 +01:00
parent a141cf2fc7
commit 2b5b7593d7
2 changed files with 2 additions and 2 deletions

View File

@ -26,4 +26,4 @@ dependencies:
Once you have the `file_picker_web` dependency in your pubspec, you should
be able to use `package:file_picker` as normal.
[1]: ../file_picker/file_picker
[1]: ../file_picker

View File

@ -46,9 +46,9 @@ class FilePicker extends FilePickerPlatform {
html.InputElement uploadInput = html.FileUploadInputElement();
uploadInput.multiple = allowMultiple;
uploadInput.accept = _fileType(type, allowedExtensions);
uploadInput.click();
uploadInput.onChange
.listen((event) => pickedFiles.complete(uploadInput.files));
uploadInput.click();
return await pickedFiles.future;
}