PdfPreview constructor

const PdfPreview({
  1. Key? key,
  2. required LayoutCallback build,
  3. PdfPageFormat? initialPageFormat,
  4. bool allowPrinting = true,
  5. bool allowSharing = true,
  6. double? maxPageWidth,
  7. bool canChangePageFormat = true,
  8. bool canChangeOrientation = true,
  9. bool canDebug = true,
  10. List<Widget>? actions,
  11. Map<String, PdfPageFormat> pageFormats = _defaultPageFormats,
  12. Widget onError(
    1. BuildContext context,
    2. Object error
    )?,
  13. void onPrinted(
    1. BuildContext context
    )?,
  14. void onPrintError(
    1. BuildContext context,
    2. dynamic error
    )?,
  15. void onShared(
    1. BuildContext context
    )?,
  16. Decoration? scrollViewDecoration,
  17. Decoration? pdfPreviewPageDecoration,
  18. String? pdfFileName,
  19. bool useActions = true,
  20. List<int>? pages,
  21. bool dynamicLayout = true,
  22. String? shareActionExtraBody,
  23. String? shareActionExtraSubject,
  24. List<String>? shareActionExtraEmails,
  25. EdgeInsets? previewPageMargin,
  26. EdgeInsets? padding,
  27. bool shouldRepaint = false,
  28. Widget? loadingWidget,
  29. ValueChanged<PdfPageFormat>? onPageFormatChanged,
  30. double? dpi,
  31. PdfActionBarTheme actionBarTheme = const PdfActionBarTheme(),
  32. bool enableScrollToPage = false,
  33. ValueChanged<bool>? onZoomChanged,
})

Show a pdf document built on demand

Implementation

const PdfPreview({
  Key? 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,
      super(key: key);