EpubViewer class
Constructors
EpubViewer ({Key ? key , required EpubController epubController , required EpubSource epubSource , String ? initialCfi , String ? initialXPath , ValueChanged <List <EpubChapter > > ? onChaptersLoaded , VoidCallback ? onEpubLoaded , VoidCallback ? onLocationLoaded , ValueChanged <EpubLocation > ? onRelocated , ValueChanged <EpubTextSelection > ? onTextSelected , EpubDisplaySettings ? displaySettings , void onAnnotationClicked (String cfiRange , Map <String , dynamic > ? rect )?, EpubSelectionCallback ? onSelection , VoidCallback ? onSelectionChanging , VoidCallback ? onDeselection , ValueChanged <String > ? onInitialPositionLoading , VoidCallback ? onInitialPositionLoaded , void onTouchDown (double x , double y )?, void onTouchUp (double x , double y )?, bool clearSelectionOnPageChange = true , bool selectAnnotationRange = false })
const
Properties
clearSelectionOnPageChange
→ bool
Whether to automatically clear text selection when navigating to a new page.
final
displaySettings
→ EpubDisplaySettings ?
initial display settings
final
epubController
→ EpubController
final
epubSource
→ EpubSource
Epub source, accepts url, file or assets
opf format is not tested, use with caution
final
hashCode
→ int
The hash code for this object.
no setter inherited
initialCfi
→ String ?
Initial cfi string to specify which part of epub to load initially
if null, the first chapter will be loaded
final
initialXPath
→ String ?
Initial xpath/XPointer string to specify which part of epub to load initially
if null and initialCfi is also null, the first chapter will be loaded
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
onAnnotationClicked
→ void Function(String cfiRange , Map <String , dynamic > ? rect ) ?
Callback for handling annotation click (Highlight and Underline)
Provides the CFI range and the selection rect (same format as onSelection)
final
onChaptersLoaded
→ ValueChanged <List <EpubChapter > > ?
Call back when chapters are loaded
final
onDeselection
→ VoidCallback ?
Callback when text selection is cleared.
final
onEpubLoaded
→ VoidCallback ?
Call back when epub is loaded and displayed
final
onInitialPositionLoaded
→ VoidCallback ?
Callback when initial position loading completes
final
onInitialPositionLoading
→ ValueChanged <String > ?
Callback when initial position loading starts (for showing progress indicator)
Receives the type: 'xpath' or 'cfi'
final
onLocationLoaded
→ VoidCallback ?
Callback when the location are generated for epub, progress will be only available after this
final
onRelocated
→ ValueChanged <EpubLocation > ?
Call back when epub page changes
final
onSelection
→ EpubSelectionCallback ?
Callback when text is selected with WebView-relative coordinates.
final
onSelectionChanging
→ VoidCallback ?
Callback fired continuously while the user is dragging selection handles.
final
onTextSelected
→ ValueChanged <EpubTextSelection > ?
Call back when text selection changes
final
onTouchDown
→ void Function(double x , double y ) ?
Callback fired when the user touches down on the EPUB viewer.
final
onTouchUp
→ void Function(double x , double y ) ?
Callback fired when the user releases a touch on the EPUB viewer.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
selectAnnotationRange
→ bool
Whether to programmatically select annotation ranges when clicked.
final
Context menu for text selection.
If null, the default context menu will be used.
final
Whether to suppress the native context menu entirely.
When true, no native context menu will be shown on text selection.
Use with onSelection to implement custom selection UI.
final
flutter_epub_viewer 1.2.5