ReadiumReaderChannel class

Internal use only. Used by ReadiumReaderWidget to talk to the native widget.

Inheritance

Constructors

ReadiumReaderChannel(String name, {required void onPageChanged(Locator), void onExternalLinkActivated(String)?})

Properties

binaryMessenger BinaryMessenger
The messenger which sends the bytes for this channel.
no setterinherited
codec MethodCodec
The message codec used by this channel, not null.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
name String
The logical channel on which communication happens, not null.
finalinherited
onExternalLinkActivated ↔ void Function(String)?
getter/setter pair
onPageChanged → void Function(Locator)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyDecorations(String id, List<ReaderDecoration> decorations) Future<void>
Apply decorations to the reader.
dispose() Future<void>
getCurrentLocator() Future<Locator?>
Get the current locator.
getLocatorFragments(Locator locator) Future<Locator?>
Get locator fragments for the given locator.
go(Locator locator, {required bool isAudioBookWithText, bool animated = false}) Future<void>
Go e.g. navigate to a specific locator in the publication.
goLeft({bool animated = true}) Future<void>
Go to the previous page.
goRight({bool animated = true}) Future<void>
Go to the next page.
invokeListMethod<T>(String method, [dynamic arguments]) Future<List<T>?>
An implementation of invokeMethod that can return typed lists.
inherited
invokeMapMethod<K, V>(String method, [dynamic arguments]) Future<Map<K, V>?>
An implementation of invokeMethod that can return typed maps.
inherited
invokeMethod<T>(String method, [dynamic arguments]) Future<T?>
Invokes a method on this channel with the specified arguments.
inherited
isLocatorVisible(Locator locator) Future<bool>
Check if a locator is currently visible on screen.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMethodCall(MethodCall call) Future
Handles method calls from the native platform.
setEPUBPreferences(EPUBPreferences preferences) Future<void>
Set EPUB preferences.
setLocation(Locator locator, bool isAudioBookWithText) Future<void>
Set the current location to the given locator.
setMethodCallHandler(Future handler(MethodCall call)?) → void
Sets a callback for receiving method calls on this channel.
inherited
setPDFPreferences(PDFPreferences preferences) Future<void>
Set PDF preferences.
toString() String
A string representation of this object.
inherited

Operators

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