search method

Future<List<EpubSearchResult>> search({
  1. required String query,
})

Search in epub using query string Returns a list of EpubSearchResult

Implementation

Future<List<EpubSearchResult>> search({
  ///Search query string
  required String query,
  // bool optimized = false,
}) async {
  searchResultCompleter = Completer<List<EpubSearchResult>>();
  if (query.isEmpty) return [];
  checkEpubLoaded();
  await webViewController?.evaluateJavascript(
      source: 'searchInBook("$query")');
  return await searchResultCompleter.future;
}