PdfScrollIndicatorBuilder typedef
Signature for PdfViewer.scrollIndicatorBuilder: builds a custom main-axis scroll indicator (a compact page number, a draggable page scrubber, a platform-styled bar) in place of the viewer's built-in scrollbar. It fills the viewer, rebuilt whenever the scroll position, zoom, or current page changes; use PdfScrollMetrics.scrollAxis to orient it - the viewer's right edge for a vertical PdfPageLayout.verticalContinuous layout, the bottom edge for a horizontal PdfPageLayout.horizontalContinuous one.
Use metrics for the page count, the layout axis, and the normalized
position/extent, and drive the view through controller -
PdfViewerController.jumpToNormalized for a scrubber-thumb drag,
PdfViewerController.jumpToPage or PdfViewerController.animateToPage
for page taps. Return an empty widget (e.g. SizedBox.shrink()) to show
nothing; the indicator is not built at all before the viewer has laid out
or when the document does not overflow (PdfScrollMetrics.hasOverflow is
false), so a builder never has to guard those cases.
Implementation
typedef PdfScrollIndicatorBuilder = Widget Function(BuildContext context,
PdfViewerController controller, PdfScrollMetrics metrics);