Section constructor

Section({
  1. required Epub source,
  2. required Item content,
  3. required int readingOrder,
})

Creates a group of text and audio that are part of an EPUB main content.

Implementation

Section({
  required Epub source,
  required this.content,
  required this.readingOrder,
})  : _source = source.zip,
      assert(content.mediaType == ItemMediaType.xhtml),
      assert(content.mediaOverlay != null
          ? content.mediaOverlay?.mediaType == ItemMediaType.mediaOverlay
          : true) {
  _audio = Lazy(_initializeAudio);
  _smilParallels = Lazy(_initializeSmilParallels);
}