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