getCoverArt function Null safety
- String mangaId
returns an Cover
class instance containing cover
art details for a manga with given mangaId
or uuid
Implementation
Future<Cover> getCoverArt(String mangaId) async {
var response = await getCoverArtResponse(mangaId);
try {
return Cover.fromJson(jsonDecode(response.body));
} on Exception {
throw MangadexServerException(jsonDecode(response.body));
}
}