getFile static method
get medium file by medium id mediumType: the type of medium mimeType: the mime type of medium
Implementation
static Future<File> getFile({
required String mediumId,
MediumType? mediumType,
String? mimeType,
}) async {
final path = await _channel.invokeMethod('getFile', {
'mediumId': mediumId,
'mediumType': mediumTypeToJson(mediumType),
'mimeType': mimeType,
}) as String?;
if (path == null) throw "Cannot get file $mediumId with type $mimeType";
return File(path);
}