extractText method

Future<EpubTextExtractRes> extractText({
  1. required dynamic startCfi,
  2. required dynamic endCfi,
})

Extract text from a given cfi range,

Implementation

Future<EpubTextExtractRes> extractText({
  ///start cfi
  required startCfi,

  ///end cfi
  required endCfi,
}) async {
  checkEpubLoaded();
  pageTextCompleter = Completer<EpubTextExtractRes>();
  await webViewController?.evaluateJavascript(
      source: 'getTextFromCfi("$startCfi","$endCfi")');
  return pageTextCompleter.future;
}