epub_viewer_pro
A full-featured EPUB viewer for Flutter with chapter-based navigation, bookmarks, highlights, notes, annotations, dark/light/sepia themes, multi-language Google Fonts support, and DRM protection.
Features
- π EPUB parsing via epubx with HTML rendering (flutter_widget_from_html)
- π Bookmarks β add, remove, sync with server
- ποΈ Highlights β text highlighting with color options
- π Notes β inline note annotations
- βοΈ Annotations β pen drawing, eraser with undo/redo
- π Table of Contents β hierarchical drawer with progress
- π Search β across all chapters
- π Dark/Light/Sepia theme support
- π€ Multi-language fonts β 25+ language-specific Google Fonts
- β© Auto-scroll with configurable interval
- π Reading progress β chapter and scroll position persistence
- π DRM protection β screenshot prevention
- π Authenticated downloads β token-based file access
- π€ Server sync β optional bookmark/annotation/session sync via callbacks
Getting Started
dependencies:
epub_viewer_pro: ^0.0.1
Usage
Basic
import 'package:epub_viewer_pro/epub_viewer_pro.dart';
EpubViewerScreen(
filePath: '/path/to/book.epub',
title: 'My Book',
);
With Server Sync
EpubViewerScreen(
filePath: '/path/to/book.epub',
title: 'My Book',
bookId: 123,
serviceConfig: EpubViewerServiceConfig(
httpHeaders: {'Authorization': 'Bearer your-jwt-token'},
onBookmarksSync: (bookId, bookmarks) async { /* sync */ },
onMessage: (msg, type) { /* show toast */ },
),
);
License
MIT License