PdfViewerGetPageRenderingScale typedef

PdfViewerGetPageRenderingScale = double? Function(BuildContext context, PdfPage page, PdfViewerController controller, double estimatedScale)

Function to customize the rendering scale of the page.

  • context is normally used to call MediaQuery.of to get the device pixel ratio
  • page can be used to determine the page dimensions
  • controller can be used to get the current zoom by PdfViewerController.currentZoom
  • estimatedScale is the precalculated scale for the page

Implementation

typedef PdfViewerGetPageRenderingScale = double? Function(
  BuildContext context,
  PdfPage page,
  PdfViewerController controller,
  double estimatedScale,
);