search method
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;
}