pickFile static method
Implementation
static Future<XFile?> pickFile({
List<String>? allowedExtensions,
}) async {
FilePickerResult? result = await FilePicker.platform.pickFiles(allowedExtensions: allowedExtensions);
if (result != null) {
XFile file = XFile(result.files.single.path!);
return file;
}
return null;
}