PdfFlowView constructor
const
PdfFlowView({
- Key? key,
- Uint8List? pdfData,
- String? pdfPath,
- double pageSpacing = 8,
- EdgeInsets padding = EdgeInsets.zero,
- Color? backgroundColor,
- void onPageTap(
- int page
- Widget pagePlaceholderBuilder(
- BuildContext context,
- int page
- double cacheExtent = 600,
- void onError(
- Object error
- Widget errorBuilder(
- BuildContext context,
- Object error
Creates a PdfFlowView.
Provide exactly one PDF source:
pdfData: the raw bytes of the PDF document.pdfPath: a URL (starting with http:// or https://) or an asset path.
Implementation
const PdfFlowView({
super.key,
this.pdfData,
this.pdfPath,
this.pageSpacing = 8,
this.padding = EdgeInsets.zero,
this.backgroundColor,
this.onPageTap,
this.pagePlaceholderBuilder,
this.cacheExtent = 600,
this.onError,
this.errorBuilder,
}) : assert(
pdfPath != null || pdfData != null,
'Either pdfPath or pdfData must be provided.',
),
assert(
pdfPath == null || pdfData == null,
'Provide only one of pdfPath or pdfData, not both.',
);