PdfViewerParams constructor

const PdfViewerParams({
  1. double margin = 8.0,
  2. Color backgroundColor = Colors.grey,
  3. PdfPageLayoutFunction? layoutPages,
  4. double maxScale = 8.0,
  5. double minScale = 0.1,
  6. bool useAlternativeFitScaleAsMinScale = true,
  7. PanAxis panAxis = PanAxis.free,
  8. EdgeInsets? boundaryMargin,
  9. PdfAnnotationRenderingMode annotationRenderingMode = PdfAnnotationRenderingMode.annotationAndForms,
  10. PdfPageAnchor pageAnchor = PdfPageAnchor.top,
  11. PdfPageAnchor pageAnchorEnd = PdfPageAnchor.bottom,
  12. double onePassRenderingScaleThreshold = 200 / 72,
  13. bool enableTextSelection = false,
  14. Color? matchTextColor,
  15. Color? activeMatchTextColor,
  16. BoxShadow? pageDropShadow = const BoxShadow(color: Colors.black54, blurRadius: 4, spreadRadius: 2, offset: Offset(2, 2)),
  17. bool panEnabled = true,
  18. bool scaleEnabled = true,
  19. GestureScaleEndCallback? onInteractionEnd,
  20. GestureScaleStartCallback? onInteractionStart,
  21. GestureScaleUpdateCallback? onInteractionUpdate,
  22. PdfViewerDocumentChangedCallback? onDocumentChanged,
  23. PdfViewerCalculateInitialPageNumberFunction? calculateInitialPageNumber,
  24. PdfViewerCalculateCurrentPageNumberFunction? calculateCurrentPageNumber,
  25. PdfViewerReadyCallback? onViewerReady,
  26. PdfPageChangedCallback? onPageChanged,
  27. PdfViewerGetPageRenderingScale? getPageRenderingScale,
  28. double? scrollByMouseWheel = 0.2,
  29. bool enableKeyboardNavigation = true,
  30. double scrollByArrowKey = 25.0,
  31. int maxImageBytesCachedOnMemory = 100 * 1024 * 1024,
  32. double horizontalCacheExtent = 1.0,
  33. double verticalCacheExtent = 1.0,
  34. PdfViewerOverlaysBuilder? viewerOverlayBuilder,
  35. PdfPageOverlaysBuilder? pageOverlaysBuilder,
  36. PdfViewerLoadingBannerBuilder? loadingBannerBuilder,
  37. PdfViewerErrorBannerBuilder? errorBannerBuilder,
  38. PdfLinkWidgetBuilder? linkWidgetBuilder,
  39. List<PdfViewerPagePaintCallback>? pagePaintCallbacks,
  40. List<PdfViewerPagePaintCallback>? pageBackgroundPaintCallbacks,
  41. PdfViewerTextSelectionChangeCallback? onTextSelectionChange,
  42. PerPageSelectionAreaInjector? perPageSelectionAreaInjector,
  43. bool forceReload = false,
})

Implementation

const PdfViewerParams({
  this.margin = 8.0,
  this.backgroundColor = Colors.grey,
  this.layoutPages,
  this.maxScale = 8.0,
  this.minScale = 0.1,
  this.useAlternativeFitScaleAsMinScale = true,
  this.panAxis = PanAxis.free,
  this.boundaryMargin,
  this.annotationRenderingMode =
      PdfAnnotationRenderingMode.annotationAndForms,
  this.pageAnchor = PdfPageAnchor.top,
  this.pageAnchorEnd = PdfPageAnchor.bottom,
  this.onePassRenderingScaleThreshold = 200 / 72,
  this.enableTextSelection = false,
  this.matchTextColor,
  this.activeMatchTextColor,
  this.pageDropShadow = const BoxShadow(
    color: Colors.black54,
    blurRadius: 4,
    spreadRadius: 2,
    offset: Offset(2, 2),
  ),
  this.panEnabled = true,
  this.scaleEnabled = true,
  this.onInteractionEnd,
  this.onInteractionStart,
  this.onInteractionUpdate,
  this.onDocumentChanged,
  this.calculateInitialPageNumber,
  this.calculateCurrentPageNumber,
  this.onViewerReady,
  this.onPageChanged,
  this.getPageRenderingScale,
  this.scrollByMouseWheel = 0.2,
  this.enableKeyboardNavigation = true,
  this.scrollByArrowKey = 25.0,
  this.maxImageBytesCachedOnMemory = 100 * 1024 * 1024,
  this.horizontalCacheExtent = 1.0,
  this.verticalCacheExtent = 1.0,
  this.viewerOverlayBuilder,
  this.pageOverlaysBuilder,
  this.loadingBannerBuilder,
  this.errorBannerBuilder,
  this.linkWidgetBuilder,
  this.pagePaintCallbacks,
  this.pageBackgroundPaintCallbacks,
  this.onTextSelectionChange,
  this.perPageSelectionAreaInjector,
  this.forceReload = false,
});