cover static method
Implementation
static Future<Uint8List?> cover({String? filePath, Uint8List? bytes, String? url}) async {
try {
final UEpubBook book = await UEpubBook.open(path: filePath, bytes: bytes, url: url);
final String? href = book.coverHref;
final Uint8List? data = href == null ? null : await book.resource(href);
await book.close();
return data == null || data.isEmpty ? null : data;
} on Object {
return null;
}
}