display method

dynamic display({
  1. required String cfi,
})

Move epub view to specific area using Cfi string, XPath/XPointer, or chapter href

Implementation

display({
  ///Cfi String, XPath/XPointer string, or chapter href of the desired location
  ///If the string starts with '/', it will be treated as XPath/XPointer
  required String cfi,
}) {
  checkEpubLoaded();
  // Escape quotes in the string
  var escapedCfi = cfi.replaceAll('"', '\\"');
  webViewController?.evaluateJavascript(source: 'toCfi("$escapedCfi")');
}