pickFile method
Injects a file input with the specified accept+capture attributes, and returns the PickedFile that the user selected locally.
capture
is only supported in mobile browsers.
See https://caniuse.com/#feat=html-media-capture
Implementation
@visibleForTesting
Future<PickedFile> pickFile({
String? accept,
String? capture,
}) {
html.FileUploadInputElement input =
createInputElement(accept, capture) as html.FileUploadInputElement;
_injectAndActivate(input);
return _getSelectedFile(input);
}