MethodChannelFlureadium class
An implementation of FlureadiumPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- FlureadiumPlatform
- MethodChannelFlureadium
Constructors
Properties
- carContentTransport → CarContentTransport
-
The transport that routes native car requests to the registered provider.
Created eagerly so its channel handler is installed before any provider
registers — a car process can be cold-launched and call in first, and the
transport answers with typed empty results until a provider is set.
final
- currentReaderWidget ↔ ReadiumReaderWidgetInterface?
-
getter/setter pairinherited
-
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
idparameter is used to identify the decoration set. Thedecorationsparameter is a list of ReaderDecoration objects to apply.override -
audiobookTrackDurations(
) → Future< List< double?> > -
The per-track durations the open audiobook navigator resolved, in
reading-order position, in seconds. An entry is
nullwhen that track's duration is neither declared by the manifest nor readable from the audio. Empty when no audiobook navigator is open, and on iOS, which reads a track's length as it plays and so resolves nothing up front. Web throwsUnimplementedError, as it does for the rest of the audiobook API.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
-
extractPageThumbnail(
String href, int maxHeight, int quality) → Future< Uint8List?> -
Extracts a downscaled JPEG thumbnail of a publication resource.
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
-
refreshCarContent(
) → void -
Triggers a re-fetch of the car browse tree on the connected head unit.
override
-
registerCarContentProvider(
CarContentProvider provider, {required CarContentStrings strings}) → void -
Registers the host's CarContentProvider that answers car head-unit
browse, search, and playback requests, with already-localized
strings.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.
pubUrlis the file path or URL to the PDF.maxWidthandmaxHeightconstrain 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
-
Sets navigation config and forwards it to the active reader widget.
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
-
ttsCanSpeak(
) → Future< bool> -
Check whether TTS can speak the current publication's language.
override
-
ttsEnable(
TTSPreferences? preferences, {Locator? fromLocator}) → Future< void> -
Enables 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
-
ttsGetSystemVoices(
) → Future< List< ReaderTTSVoice> > -
Get the list of available TTS voices from the OS.
override
-
ttsRequestInstallVoice(
) → Future< void> -
Request the system to install missing TTS voice data.
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
-
unregisterCarContentProvider(
) → void -
Removes the registered car content provider, if any.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited