PdfPreview constructor
const
PdfPreview({
- Key? key,
- required LayoutCallback build,
- PdfPageFormat? initialPageFormat,
- bool allowPrinting = true,
- bool allowSharing = true,
- double? maxPageWidth,
- bool canChangePageFormat = true,
- bool canChangeOrientation = true,
- bool canDebug = true,
- List<
Widget> ? actions, - Map<
String, PdfPageFormat> pageFormats = _defaultPageFormats, - Widget onError(
- BuildContext context,
- Object error
- void onPrinted(
- BuildContext context
- void onPrintError(
- BuildContext context,
- dynamic error
- Decoration? scrollViewDecoration,
- Decoration? pdfPreviewPageDecoration,
- String? pdfFileName,
- bool useActions = true,
- List<
int> ? pages, - bool dynamicLayout = true,
- EdgeInsets? previewPageMargin,
- EdgeInsets? padding,
- bool shouldRepaint = false,
- Widget? loadingWidget,
- ValueChanged<
PdfPageFormat> ? onPageFormatChanged, - double? dpi,
- PdfActionBarTheme actionBarTheme = const PdfActionBarTheme(),
- bool enableScrollToPage = false,
- ValueChanged<
bool> ? onZoomChanged,
Show a pdf document built on demand
Implementation
const PdfPreview({
super.key,
required this.build,
this.initialPageFormat,
this.allowPrinting = true,
this.allowSharing = true,
this.maxPageWidth,
this.canChangePageFormat = true,
this.canChangeOrientation = true,
this.canDebug = true,
this.actions,
this.pageFormats = _defaultPageFormats,
this.onError,
this.onPrinted,
this.onPrintError,
this.onShared,
this.scrollViewDecoration,
this.pdfPreviewPageDecoration,
this.pdfFileName,
this.useActions = true,
this.pages,
this.dynamicLayout = true,
this.shareActionExtraBody,
this.shareActionExtraSubject,
this.shareActionExtraEmails,
this.previewPageMargin,
this.padding,
this.shouldRepaint = false,
this.loadingWidget,
this.onPageFormatChanged,
this.dpi,
this.actionBarTheme = const PdfActionBarTheme(),
this.enableScrollToPage = false,
this.onZoomChanged,
}) : _pagesBuilder = null;