coverFitting method
Returns the publication cover as a Bitmap
, scaled down to fit the given maxSize
.
Implementation
Future<Image?> coverFitting(ImageSize maxSize) async {
Image? cover = await findService<CoverService>()?.coverFitting(maxSize);
if (cover != null) {
return cover;
}
return _coverFromManifest().then((value) => value?.let((it) => copyResize(
it,
width: maxSize.width.toInt(),
height: maxSize.height.toInt())));
}