readCover method

Future<Image?> readCover()

Reads the book's cover image.

Attempts to extract the cover image from the EPUB manifest. If no cover is specified, falls back to the first image in the manifest.

Returns null if no suitable cover image is found.

Example

final cover = await bookRef.readCover();
if (cover != null) {
  print('Cover dimensions: ${cover.width}x${cover.height}');
}

Implementation

Future<Image?> readCover() async {
  return await BookCoverReader.readBookCover(this);
}