MethodChannelFlureadium class

An implementation of FlureadiumPlatform that uses method channels.

Inheritance

Constructors

MethodChannelFlureadium()

Properties

currentReaderWidget ReadiumReaderWidgetInterface?
getter/setter pairinherited
defaultPdfPreferences PDFPreferences?
getter/setter pairinherited
defaultPreferences EPUBPreferences?
getter/setter pairinherited
errorEventChannel EventChannel
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
getter/setter pair
onErrorEvent Stream<ReadiumError>
State stream for error events occurring in the reader or playback.
no setteroverride
onReaderStatusChanged Stream<ReadiumReaderStatus>
no setteroverride
onTextLocatorChanged Stream<Locator>
Fires whenever the Reader's current Locator changes.
no setteroverride
onTimebasedPlayerStateChanged Stream<ReadiumTimebasedState>
Fires whenever the TimebasedNavigator changes state
no setteroverride
readerStatusChannel EventChannel
The event channel used to receive text Locator changes from the native platform.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textLocatorChannel EventChannel
The event channel used to receive text Locator changes from the native platform.
getter/setter pair
timebasedStateChannel EventChannel
getter/setter pair

Methods

applyDecorations(String id, List<ReaderDecoration> decorations) Future<void>
Apply reader decorations (highlights, bookmarks, etc.) to the current ReaderWidgetView. The id parameter is used to identify the decoration set. The decorations parameter is a list of ReaderDecoration objects to apply.
override
audioEnable({AudioPreferences? prefs, Locator? fromLocator}) Future<void>
Enable audiobook playback with optional preferences and starting from an optional locator.
override
audioSeekBy(Duration offset) Future<void>
Seek in audio playback relative to current position by the given offset in seconds. Positive values seek forward, negative values seek backward. This is an alternative to next/previous which seeks by a fixed interval.
override
audioSetPreferences(AudioPreferences prefs) Future<void>
Change the audiobook playback preferences such as speed and seek interval.
override
closePublication() Future<void>
Close the currently open publication and its related reader or playback ressources.
override
getLinkContent(Link link) Future<String?>
Retrieves the content of a given link in the current Publication as a string.
override
goLeft() Future<void>
Navigate left/backwards visually in the current publication renderer.
override
goRight() Future<void>
Navigate right/forwards visually in the current publication renderer.
override
goToLocator(Locator locator) Future<bool>
Go directly to the given Locator in the publication, whether visual or audio.
override
loadPublication(String pubUrl) Future<Publication>
Load publication manifest from URL, which is usually a packaged ebook or direct URL to a manifest. This will NOT store a reference to the Publication and is purely meant to be used for fetching metadata/manifest for multiple books.
override
next() Future<void>
Skip to next logical item during playback. For audiobooks this is the default seek interval. For TTS this is the next paragraph.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openPublication(String pubUrl) Future<Publication>
Opens a publication from a URL and prepares it for reading or playback. If the URL has not already been loaded, it will implicitly do this.
override
pause() Future<void>
Pause playback.
override
play(Locator? fromLocator) Future<void>
Play the publication from the given locator, or resume if null.
override
previous() Future<void>
Skip to previous logical item during playback. For audiobooks this is the default seek interval. For TTS this is the previous paragraph.
override
renderFirstPage(String pubUrl, {int maxWidth = 600, int maxHeight = 800}) Future<Uint8List?>
Renders the first page of a PDF publication as a JPEG image. Returns the image bytes, or null if rendering fails. pubUrl is the file path or URL to the PDF. maxWidth and maxHeight constrain the output dimensions.
override
resume() Future<void>
Resume playback.
override
setCustomHeaders(Map<String, String> headers) Future<void>
override
setDecorationStyle(ReaderDecorationStyle? utteranceDecoration, ReaderDecorationStyle? rangeDecoration) Future<void>
Set the decoration styles for utterances and ranges.
override
setDefaultPdfPreferences(PDFPreferences preferences) → void
inherited
setDefaultPreferences(EPUBPreferences preferences) → void
inherited
setEPUBPreferences(EPUBPreferences preferences) Future<void>
Sets the default EPUB rendering preferences and updates preferences for the ReaderWidgetView.
override
skipToNext() Future<void>
Skip to next chapter in the current publication.
override
skipToPrevious() Future<void>
Skip to previous chapter in the current publication.
override
stop() Future<void>
Stop playback.
override
toString() String
A string representation of this object.
inherited
ttsEnable(TTSPreferences? preferences) Future<void>
Enabled TTS playback for the current publication with optional preferences.
override
ttsGetAvailableVoices() Future<List<ReaderTTSVoice>>
Get the list of available TTS voices on the platform.
override
ttsSetPreferences(TTSPreferences preferences) Future<void>
Change the TTS preferences such as speed, pitch, and volume.
override
ttsSetVoice(String voiceIdentifier, String? forLanguage) Future<void>
Set the TTS voice by its identifier, optionally for a specific language.
override

Operators

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