goToMatch method
Go to the given match.
Implementation
Future<void> goToMatch(PdfTextRangeWithFragments match) async {
_currentMatch = match;
_currentIndex = _matches.indexOf(match);
await controller?.ensureVisible(
controller!.calcRectForRectInsidePage(
pageNumber: match.pageNumber,
rect: match.bounds,
),
margin: 50,
);
controller?.invalidate();
}