youscribe_epub_reader (1.2.0)

Published 2026-07-28 10:35:44 +00:00 by hugo

Installation

dart pub add youscribe_epub_reader:1.2.0 --hosted-url=

About this package

A Flutter package that exposes a clean EPUB reader API surface.

youscribe_epub_reader

A Flutter package that exposes a clean EPUB reader API surface, backed by the native Readium toolkit via flutter_readium.

Public API

Class Role
EpubBook EPUB book metadata + file URI
IEpubController / EpubController Controller interface + default impl
EpubReadingDelegate Abstract hook for persistence/analytics
EpubReader Main reader widget
EpubReaderConfiguration UI configuration flags
EpubReaderCallbacks User interaction callbacks
EpubReaderTheme Full theming palette
EpubReaderSettings Font, theme, night mode, scroll mode
EpubTheme Content theme (system / dark / sepia)
EpubReadingState Current reading position
EpubTocItem Table of contents entry

Architecture

EpubReader (widget)
  └─ EpubController (IEpubController)
       ├─ EpubReaderRuntime (Readium integration)
       │    ├─ FlutterReadium — open publication, navigation, preferences
       │    ├─ ReadiumReaderWidget — native EPUB canvas
       │    └─ EPUBPreferences → theme, font, scroll mode
       └─ DefaultEpubReaderView — Flutter chrome (AppBar, TOC drawer, settings)
            ├─ TocDrawer — chapter navigation
            └─ ReaderSettingsSheet — theme, font, night mode, scroll mode

The runtime lives in internal/ and is not exported.

Usage

final controller = EpubController();

EpubReader(
  epubBook: EpubBook(
    productId: 'book-42',
    fileUri: Uri.parse('file:///tmp/book.epub'),
  ),
  controller: controller,
);

Native configuration

The Readium engine requires native setup on both platforms:

  • Android: minSdk = 24, isCoreLibraryDesugaringEnabled = true, coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
  • iOS: Readium pods in Podfile (see youscribe_sdk/README.md)

Full details in the SDK documentation.

Details
Pub
2026-07-28 10:35:44 +00:00
6
37 KiB
Assets (1)
1.2.0.tar.gz 37 KiB
Versions (2) View all
1.2.0 2026-07-28
1.1.0 2026-05-28