ReadiumReaderChannel constructor

ReadiumReaderChannel(
  1. String name, {
  2. required void onReaderReady(),
  3. required void onPageChanged(
    1. Locator
    ),
  4. void onExternalLinkActivated(
    1. String
    )?,
  5. void onTextSelected(
    1. TextSelectionEvent
    )?,
  6. void onSelectionAction(
    1. SelectionActionEvent
    )?,
  7. void onDecorationInteraction(
    1. DecorationInteractionEvent
    )?,
  8. void onImageTapped(
    1. ImageTapEvent
    )?,
})

Creates a channel bound to name. onReaderReady is called when the native navigator first reports content on screen. onPageChanged is called when the native navigator reports a page change. onExternalLinkActivated is called when an external (non-publication) link is tapped.

Implementation

ReadiumReaderChannel(
  super.name, {
  required this.onReaderReady,
  required this.onPageChanged,
  this.onExternalLinkActivated,
  this.onTextSelected,
  this.onSelectionAction,
  this.onDecorationInteraction,
  this.onImageTapped,
}) {
  setMethodCallHandler(onMethodCall);
}