getAlbumThumbnail static method
Get album thumbnail by album id mediumType: the type of medium newest: whether to get the newest medium or oldest medium as album thumbnail width: the width of thumbnail height: the height of thumbnail highQuality: whether to use high quality of album thumbnail
Implementation
static Future<List<int>> getAlbumThumbnail({
required String albumId,
MediumType? mediumType,
bool newest = true,
int? width,
int? height,
bool? highQuality = false,
}) async {
final bytes = await _channel.invokeMethod('getAlbumThumbnail', {
'albumId': albumId,
'mediumType': mediumTypeToJson(mediumType),
'newest': newest,
'width': width,
'height': height,
'highQuality': highQuality,
});
if (bytes == null) throw "Failed to fetch thumbnail of album $albumId";
return List<int>.from(bytes);
}