image method

Future<Uint8List?> image(
  1. String href
)

Implementation

Future<Uint8List?> image(String href) async {
  final Uint8List? cached = _images.get(href);
  if (cached != null) return cached;
  final UEpubBook? book = _book;
  if (book == null) return null;
  final Uint8List data = await book.resource(href);
  if (data.isEmpty) return null;
  _images.put(href, data);
  return data;
}