ReadiumReaderChannel constructor

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

Creates a channel bound to name. 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.onPageChanged,
  this.onExternalLinkActivated,
  this.onTextSelected,
  this.onSelectionAction,
  this.onDecorationInteraction,
}) {
  setMethodCallHandler(onMethodCall);
}