PdfPageTextureBuilder typedef Null safety

PdfPageTextureBuilder = Widget Function({bool backgroundFill, PdfPagePlaceholderBuilder? placeholderBuilder, double? renderingPixelRatio, Size? size})

Function definition to generate the actual widget that contains rendered PDF page image.

size should be the page widget size but it can be null if you don't want to calculate it. Unlike the function name, it may generate widget other than Texture. the function generates a placeholder Container for the unavailable page image. Anyway, please note that the size is in screen coordinates; not the actual pixel size of the image. In other words, the function correctly deals with the screen pixel density automatically. backgroundFill specifies whether to fill background before rendering actual page content or not. The page content may not have background fill and if the flag is false, it may be rendered with transparent background. renderingPixelRatio specifies pixel density for rendering page image. If it is null, the value is obtained by calling MediaQuery.of(context).devicePixelRatio. Please note that on iOS Simulator, it always use non-Texture rendering pass.


typedef PdfPageTextureBuilder = Widget Function(
    {Size? size, PdfPagePlaceholderBuilder? placeholderBuilder, bool backgroundFill, double? renderingPixelRatio});