flutter_epub_viewer_kit 0.2.0
flutter_epub_viewer_kit: ^0.2.0 copied to clipboard
A customizable EPUB reader widget for Flutter. Supports iOS, Android, and Web platforms with features like pagination, scrolling, bookmarks, and customizable themes.
0.2.0 #
Breaking Changes #
EpubReaderWidgetno longer wraps itself in aScaffold— it is now an embeddable widget. Wrap it in your ownScaffold(or any layout);SafeAreais still applied internallytopBarBuilder/bottomBarBuildernow receive a thirdReadingPositionparameter and both returnWidget— thePreferredSizeWidgetrequirement on the top bar is dropped (itspreferredSizewas never used)showTopBar/showBottomBar: falsenow disables that bar entirely — the center tap toggle no longer resurrects explicitly disabled bars, and prop changes apply on rebuildSettingsPanelremoved from public exports — it was unusable (its constructor requiresSettingsNotifier, which was never exported)
Bug Fixes #
- Fix custom
fontFamilybeing silently ignored — unknown font names are now applied as-is, enabling app-bundled fonts - Add missing
==/hashCodetoEpubSourceBytes— passing a new instance with identical bytes on rebuild no longer reloads the entire book - Fix race condition when swapping the EPUB source while a previous load is in flight — a stale load can no longer overwrite the newly requested book
- Fix unnecessary full repagination when toggling page/scroll view mode — layout metrics are unchanged, so the pagination cache is kept
Documentation & Example #
- Document
progressBarColor,title,onLoadingProgress, tap zones, bar builder contract, and the persistence-over-initialSettingsprecedence in README - Example app now demonstrates localization presets,
progressBarColor, asset book selection, in-reader dynamic source swap, and the new bar builder signature - Replace the example's stale counter template test with a real smoke test
0.1.3 #
Bug Fixes #
- Fix content failing to load for EPUBs with a sparse or incomplete
toc.ncx(common with Calibre-generated files) — reader now falls back to the spine, which is the authoritative reading order per the EPUB spec, so books where NCX only references the title page now render all content
New Features #
- Skip the cover/title page from the reading flow — detects cover via
<guide type="cover">, EPUB 3properties="cover-image", and EPUB 2<meta name="cover">so the reader opens on actual content instead of the cover image
0.1.1 #
Bug Fixes #
- Fix page content changing when toggling top/bottom bars — reader now uses stable viewport constraints regardless of bar visibility, preventing unnecessary repagination
New Features #
- Add reading progress bar at the top of the screen when bars are hidden (2px thin indicator)
- Top/bottom bars now render as overlays instead of resizing the reader content area (iBooks/Kindle-style UX)
0.1.0 #
Bug Fixes #
- Fix pagination freeze —
_isPaginatingflag now resets on cancelled pagination runs, preventing permanent loading screen - Fix paragraph index gaps in EPUBs with multi-row tables, which caused scroll-mode page tracking errors
- Fix settings panel overflow on small screens — Color Theme, Font Family, View Mode selectors now use
Wrap/Columnlayout - Fix
_buildControlRowlabel overflow with long localized strings — label now usesFlexiblewith ellipsis - Fix
onSettingsChangedcallback firing on every scroll/page turn — now only fires on actual settings changes - Fix content area wasting 56px when bottom bar is hidden — layout now adapts dynamically to bar visibility
- Fix
Bookmark.copyWithunable to clear nullabletitle/excerptfields — uses sentinel pattern
New Features #
- Support swapping EPUB source without recreating the widget (
didUpdateWidget) - Add
==/hashCodetoReaderSettings,EpubSourcesubclasses, andBookmark.copyWithsentinel support
Performance #
- Parallelize settings storage load and EPUB parsing on startup (previously sequential)
- Eliminate redundant
setSettingscalls on every scroll tick
Internal #
- Extract
_buildSectionhelper in settings panel to reduce layout duplication - Unify duplicated table-splitting logic into single loop in
_loadBookContent
0.0.9 #
- Add multi-language localization support with
EpubReaderLocalization - Built-in translations for 11 languages: Korean (default), English, Chinese (Simplified), Hindi, Spanish, Arabic, French, Portuguese, Russian, Japanese, German
- All UI strings (settings panel labels, error messages) are fully localizable
- Custom translations supported via constructor with Korean defaults for backwards compatibility
- Fix
fontSansSerifEnglish value from'Gothic'to'Sans-serif' - Fix non-
EpubLoadExceptionerrors displaying rawe.toString()instead of localized unknown error message - Localize Noto Sans font button label via
fontNotoSansfield for consistency - Change
ColorTheme.namevalues from Korean to English
0.0.8 #
- Fix images not rendering in EPUB files — image-only elements (e.g.
<img>directly in<body>) were misclassified as spacing and silently dropped - Fix
getElementsByTagNamenot matching when the element itself is the<img>tag — now also checkselement.localName - Fix image paragraphs being filtered out due to empty
plainText—richContenttype now bypasses text-based filtering - Fix pagination for image-heavy EPUBs — each image paragraph is allocated a full page instead of near-zero height
- Add
blockTagssupport forimg,image,svgin_splitIntoBlockElements - Wrap standalone
<img>elements in<div>for correctflutter_htmlTagExtensionhandling - Improve EPUB image path resolution with filename-based and case-insensitive fallback matching
0.0.7 #
- Fix pagination density: pages no longer show only 1-2 lines or half-empty content
- Add
_ParagraphTypeclassification (plainText, dialogue, richContent, spacing) for accurate per-type measurement and rendering - Fix dialogue table rendering: measure and render with matching two-column layout (name + text)
- Fix
requiresRichContentalways being true — plain text paragraphs now useTextwidget instead ofHtml - Preserve spacing paragraphs (
 ) for proper section gaps - Split multi-row dialogue tables into individual paragraph items
- Reduce safe margin from 2x to 1x line height for better page utilization
- Remove unsupported platform files (linux, macos, windows) from example app
0.0.6 #
- Add comprehensive example app with feature configuration screen
- Add page/scroll mode toggle to settings panel
- Example app demonstrates all widget features: source types, watermark, max pages, persistence, resume position, custom bars, initial bookmarks
0.0.5 #
- Remove flutter_riverpod dependency to prevent version conflicts with user apps
- Replace Riverpod with Flutter's built-in ChangeNotifier for internal state management
- Remove unused bookmarks_provider.dart
0.0.3 #
- Remove unused platform runners (linux, macos, windows)
- Update README for pub.dev installation
0.0.2 #
- Initial release
- EPUB reader widget with pagination and scroll modes
- Customizable themes and fonts
- Bookmark management
- Settings persistence
- Support for iOS, Android, and Web platforms