getCoverArt function Null safety
returns an Cover
class instance containing cover
art details for a manga with given mangaIds
or uuid
Implementation
Future<Cover> getCoverArt(
List<String> mangaIds, [
List<String>? coverIds,
List<String>? uploaders,
List<String>? locales,
Map<CoverOrders, OrderDirections>? order,
int? limit,
int? offset,
]) async {
var response = await getCoverArtResponse(
mangaIds, coverIds, uploaders, locales, order, limit, offset);
print(response.body);
try {
return Cover.fromJson(jsonDecode(response.body));
} on Exception {
throw MangadexServerException(jsonDecode(response.body));
}
}