Epub.fromBytes constructor

Epub.fromBytes(
  1. Uint8List fileBytes
)

Constructs an Epub instance from a list of bytes.

The fileBytes parameter should contain the raw bytes of the EPUB file.

Implementation

Epub.fromBytes(Uint8List fileBytes)
    : zip = ZipDecoder().decodeBytes(fileBytes) {
  _metadata = Lazy(_initializeMetadata);
  _items = Lazy(_initializeItems);
  _sections = Lazy(_initializeSections);
}