getCharacterPictures method
Implementation
Future<BuiltList<Picture>> getCharacterPictures(int characterId) async {
var url = '/character/$characterId/pictures';
var response = await _getResponse(url);
var pictures = response['pictures'] ?? [];
if (pictures.isNotEmpty &&
pictures[0]['large'] == null &&
pictures[0]['image_url'] != null) {
pictures = pictures
.map((i) => {'large': i['image_url'], 'small': i['image_url']});
}
return serializers.deserialize(pictures, specifiedType: _fullType(Picture))!
as BuiltList<Picture>;
}