getRectFromCfi method
Get bounding rectangle for a given CFI range Returns WebView-relative coordinates in pixels, or null if rect cannot be determined
Implementation
Future<Rect?> getRectFromCfi(String cfiRange) async {
checkEpubLoaded();
cfiRectCompleter = Completer<Rect?>();
await webViewController?.callAsyncJavaScript(
functionBody: 'getRectFromCfi(cfiRange)',
arguments: {'cfiRange': cfiRange},
);
return cfiRectCompleter.future;
}