ReadiumReaderWidget class

A ReadiumReaderWidget wraps a native Kotlin/Swift Readium navigator widget.

Inheritance

Constructors

ReadiumReaderWidget({required Publication publication, Widget? loadingWidget, Locator? initialLocator, ValueNotifier<bool>? shouldShowControls, dynamic onExternalLinkActivated(String)?, ValueChanged<TextSelectionEvent>? onTextSelected, ValueChanged<SelectionActionEvent>? onSelectionAction, ValueChanged<DecorationInteractionEvent>? onDecorationInteraction, ValueChanged<ImageTapEvent>? onImageTapped, List<SelectionAction> selectionActions = const [], List<ReaderFontFamily> fontFamilyDeclarations = const [], Set<DefaultSelectionAction>? allowedDefaultActions, String goBackwardSemanticLabel = 'Go Backward', String goForwardSemanticLabel = 'Go Forward', String toggleShowControlsSemanticLabel = 'Toggle show controls', int preloadPreviousPositionCount = 2, int preloadNextPositionCount = 6, Key? key})
const

Properties

allowedDefaultActions → Set<DefaultSelectionAction>?
Controls which system-provided actions appear in the text selection menu.
final
fontFamilyDeclarations → List<ReaderFontFamily>
Static font families whose faces are bundled as Flutter assets.
final
goBackwardSemanticLabel → String
Accessibility label for the backward navigation semantic region.
final
goForwardSemanticLabel → String
Accessibility label for the forward navigation semantic region.
final
hashCode → int
The hash code for this object.
no setterinherited
initialLocator → Locator?
Optional locator to restore a previously saved reading position. null starts from the beginning.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingWidget → Widget?
Optional widget to show while the reader is loading, e.g. a spinner. It will be shown until the native reader reports that its initial content is visually ready. It should typically be a full-screen widget, since it will be stacked on top of the reader widget.
final
onDecorationInteraction → ValueChanged<DecorationInteractionEvent>?
Callback invoked when the user interacts with an existing decoration (e.g. taps a highlight).
final
onExternalLinkActivated → dynamic Function(String)?
Callback invoked when the reader activates an external (non-publication) link.
final
onImageTapped → ValueChanged<ImageTapEvent>?
Callback invoked when the user taps an image in the EPUB.
final
onSelectionAction → ValueChanged<SelectionActionEvent>?
Callback invoked when the user taps a configured editing action on selected text.
final
onTextSelected → ValueChanged<TextSelectionEvent>?
Callback invoked when the user selects text in the reader.
final
preloadNextPositionCount → int
Number of resource positions to preload after the current one. Default 6. See preloadPreviousPositionCount for tradeoffs and platform support.
final
preloadPreviousPositionCount → int
Number of resource positions to preload before the current one. Default 2. Higher values smooth out backward navigation at the cost of memory; consider increasing for local publications and lowering for remote ones.
final
publication → Publication
The publication to display, obtained from FlutterReadium.openPublication.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectionActions → List<SelectionAction>
Native context menu actions shown when text is selected.
final
shouldShowControls → ValueNotifier<bool>?
Notifier that tells client whether it should show controls, based on user-interaction with the native viewer.
final
toggleShowControlsSemanticLabel → String
Accessibility label for the controls toggle semantic region.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited