Flutter plugin for reading EPUB and WebPub books. Based on the Readium toolkit components
Build EPUB, PDF, audiobook, comic, and WebPub readers in Flutter with one unified Dart API—powered by Readium toolkits on iOS, Android, and Web.
Get started · Example app · API docs
![]() Captured on iOS: EPUB styling, read-along, then narrated comic panels. |
Features
|
Select an iOS Simulator capture to see it full size.
Add the package:
flutter pub add flutter_readium
See the complete reader screen for opening a local file or URL, mounting the reader, and closing the publication. The five-minute walkthrough continues with navigation, preferences, and position restoration.
flutter_readium is a federated plugin that delegates to the upstream Readium toolkit on each platform:
@readium/shared, @readium/navigator) on WebThe canonical version pins live in flutter_readium/ios/flutter_readium.podspec, flutter_readium/android/build.gradle (ext.readium_version), and flutter_readium/package.json. Run bin/readium_versions to print them at any time.
| Format | Visual | TTS | Audio | Media Overlays |
|---|---|---|---|---|
| EPUB 2 | ✓ | ✓ | — | - |
| EPUB 3 | ✓ | ✓ | ✓ | - |
| WebPub | ✓ | ✓ | ✓ | ✓ (EPUB profile) |
| Audiobook | — | — | ✓ | - |
| ✓ | — | — | - | |
| CBZ | ✓ | — | — | - |
| DiViNa | ✓ | — | ✓¹ | ✓¹ (Guided Navigation) |
¹ DiViNa audio narration is driven by a Guided Navigation document and synchronizes at the page
level on all platforms (on Web, ts-toolkit has no DiViNa navigator, so images are rendered by a
plugin-side navigator). Panel-level zoom (the segments' xywh regions) is not yet implemented on
any platform.
LCP-protected publications are not currently supported. The underlying toolkits include an LCP adapter; it may be enabled in a future release.
| Feature | Android | iOS | Web |
|---|---|---|---|
| EPUB visual reading | ✓ | ✓ | ✓ |
| Comics (CBZ / DiViNa) | ✓ | ✓ | ✓ |
| PDF reading | ✓ | ✓ | — |
| Audiobook playback | ✓ | ✓ | ✓ |
| Media Overlays | ✓ | ✓ | ✓ |
| Text-to-Speech | ✓ | ✓ | Limited¹ |
| Highlights / decorations | ✓ | ✓ | ✓ |
| Reader preferences | ✓ | ✓ | ✓ |
| PDF preferences | ✓ | ✓ | — |
| Progress saving | ✓ | ✓ | ✓ |
| Content search | ✓ | ✓ | — |
| Background audio | ✓ | ✓ | — |
¹ Web TTS uses the browser's Web Speech API — voice availability and quality vary by browser.
macOS note: Native
Android: TalkBack touch exploration cannot focus Flutter widgets drawn over ReadiumReaderWidget
https://github.com/Notalib/flutter_readium/issues/382
Labels: 없음
web: move reader keys to upstream keyboardPeripherals
https://github.com/Notalib/flutter_readium/issues/375
Labels: 없음
fix(web): resolve the audio file from the text anchor, matching native
https://github.com/Notalib/flutter_readium/issues/372
Labels: enhancement, javascript
fix(android,web): report real navigation results from goToProgression and goToLocator
https://github.com/Notalib/flutter_readium/issues/370
Labels: enhancement
Thank you for considering a contribution! This guide covers everything you need to go from a fresh clone to a passing build.
| Tool | Minimum version | Notes |
|---|---|---|
| Flutter SDK | 3.32.0 | Stable channel recommended |
| Dart SDK | 3.8.0 | Bundled with Flutter |
| Xcode | 15+ | iOS target |
| Android Studio / JDK | Java 18 | compileSdk 37 |
| Node.js | 18+ | Web TypeScript build only |
| uv | any | Optional. Runs towncrier for bin/changelog; brew install uv |
git clone https://github.com/notalib/flutter_readium.git
cd flutter_readium
# Install all pub dependencies, build the web bundles and fetch test fixtures
bin/install
Setup script bin/install does the following in order:
flutter pub get in every packageassets/_helper_scripts TypeScript bundleexample/web/bin/fetch_test_resources (see Test fixtures)The iOS example uses Swift Package Manager, so there is no pod install step. Xcode resolves the Swift packages on the first build.
If you only change Dart code you can skip the full install and just run flutter pub get in the affected package.
Test publications are not committed to this repo. They are generated from the
readium-test-resources repo,
which holds the unpackaged source publications (the single source of truth).
bin/fetch_test_resources clones that repo and runs bin/build_test_fixtures, which:
flutter_readium/example/assets/pubs/ (.epub / .webpub / .audiobook / .pdf / …); andflutter_readium/example/web/test-fixtures/<scenario>/ (via bin/trim_web_fixture.py), each served at /test-fixtures/<scenario>/manifest.json during flutter drive -d chrome.bin/install runs the fetch; CI uses the fetch-test-resources action before every integration-test job.bin/build_test_fixtures; the served paths are referenced from integration_test/test_fixtures_web.dart (automated) and example/assets/webManifestList.json (interactive bookshelf).To add or change a fixture: edit the source in readium-test-resources (add a
new one there if none fits), then add/adjust the matching trim line in
bin/build_test_fixtures and re-run bin/fetch_test_resources.
This is a federated Flutter plugin with two pub packages:
flutter_readium_platform_interface/ — shared Dart models, method-channel contract, and platform API surfaceflutter_readium/ — app-facing package; bundles native wrappers (iOS, Android) and the web implementationflutter_readium/example/ — smoke-test app; use this to verify UI changesImplementation plans live under docs/plans/ and are split by status:
docs/plans/ — implemented or historical reference plans retained for contextdocs/plans/todo/ — still-actionable local plugin plansdocs/plans/upstream/ — plans whose real fix belongs in an upstream toolkitWhen moving a plan from todo/ to implemented reference status, keep the file if its reasoning is
still useful and add a short implemented note near the top instead of deleting the context.
# First run install script from project root
./bin/install
# Then go to the example app folder and run
cd flutter_readium/example
flutter run # for native platforms, pick a device when prompted
flutter run -d chrome # for web platform
For web, make sure you run bin/update_web_example after any TypeScript change.
For dependency size analysis (run from flutter_readium/, the npm workspace root):
npm run build:helpers:stats (outputs flutter_readium/assets/helpers/stats.html and flutter_readium/assets/helpers/stats.json)npm run build:stats (outputs flutter_readium/build/rollup-stats.html and flutter_readium/build/rollup-stats.json)The overrides block in flutter_readium/package.json clears npm audit findings. deepmerge is pinned to 4.1.2 as a downgrade: GHSA-gcqx-w48m-w2h4 covers 4.2.0–4.3.1 and no fixed 4.x exists, so never bump it up until upstream ships a patch.
# Platform interface unit tests
cd flutter_readium_platform_interface && flutter test
# Plugin unit tests
cd flutter_readium && flutter test
CI is orchestrated by .github/workflows/ci.yml. Its reusable .github/workflows/test.yml runs Dart, web, Android, and iOS unit tests in separate jobs, selecting native/web suites using platform change detection. Dart unit tests run whenever any platform is selected. All selected unit tests, builds, and integration tests contribute to the CI result check. You can also manually dispatch the Unit Tests workflow to run all unit-test suites.
End-to-end tests that exercise the Dart → native → Dart contract live under flutter_readium/example/integration_test/.
Run them against a booted simulator/emulator or attached device:
cd flutter_readium/example
# iOS — pick a booted simulator UDID via `xcrun simctl list devices`
flutter test integration_test --device-id=<udid>
# Android — start an emulator or attach a device first
flutter test integration_test
The same suite runs in CI on every push/PR via .github/workflows/integration-test.yml on an iOS simulator and Android emulators. Feel free to add relevant integration tests, especially when implementing new features and use-cases.