pickFile static method
Future<UFileData?>
pickFile({
- FileType fileType = FileType.any,
- List<
String> ? allowedExtensions, - UCropOptions? crop,
- dynamic action()?,
Implementation
static Future<UFileData?> pickFile({
FileType fileType = FileType.any,
List<String>? allowedExtensions,
UCropOptions? crop,
Function(UFileData?)? action,
}) async {
final List<UFileData> files = await showFilePicker(fileType: fileType, allowedExtensions: allowedExtensions, crop: crop);
final UFileData? file = files.isEmpty ? null : files.first;
action?.call(file);
return file;
}