selection method
Selects a specific text range in the PDF document. This method allows you to select a text range based on the provided
// first: search for text
final searcher = cpdfDocument.getTextSearcher();
List<CPDFTextRange> results = await searcher.searchText(
'keywords', searchOptions: CPDFSearchOptions.caseInsensitive);
// then: select the first result
CPDFTextRange range = searcher.searchResults[0];
await searcher.selection(range);
Implementation
Future<void> selection(CPDFTextRange range) async {
return await _channel.invokeMethod('search_text_selection', range.toJson());
}