getThumbnail static method
Future<List<int> >
getThumbnail({
- required String mediumId,
- MediumType? mediumType,
- int? width,
- int? height,
- bool? highQuality = false,
Get medium thumbnail by medium id
Implementation
static Future<List<int>> getThumbnail({
required String mediumId,
MediumType? mediumType,
int? width,
int? height,
bool? highQuality = false,
}) async {
final bytes = await _channel.invokeMethod('getThumbnail', {
'mediumId': mediumId,
'mediumType': mediumTypeToJson(mediumType),
'width': width,
'height': height,
'highQuality': highQuality,
});
if (bytes == null) throw "Failed to fetch thumbnail of medium $mediumId";
return new List<int>.from(bytes);
}