PdfViewerParams constructor
const
PdfViewerParams({
- double margin = 8.0,
- Color backgroundColor = Colors.grey,
- PdfPageLayoutFunction? layoutPages,
- double maxScale = 8.0,
- double minScale = 0.1,
- bool useAlternativeFitScaleAsMinScale = true,
- PanAxis panAxis = PanAxis.free,
- EdgeInsets? boundaryMargin,
- PdfAnnotationRenderingMode annotationRenderingMode = PdfAnnotationRenderingMode.annotationAndForms,
- PdfPageAnchor pageAnchor = PdfPageAnchor.top,
- PdfPageAnchor pageAnchorEnd = PdfPageAnchor.bottom,
- double onePassRenderingScaleThreshold = 200 / 72,
- bool enableTextSelection = false,
- Color? matchTextColor,
- Color? activeMatchTextColor,
- BoxShadow? pageDropShadow = const BoxShadow(color: Colors.black54, blurRadius: 4, spreadRadius: 2, offset: Offset(2, 2)),
- bool panEnabled = true,
- bool scaleEnabled = true,
- GestureScaleEndCallback? onInteractionEnd,
- GestureScaleStartCallback? onInteractionStart,
- GestureScaleUpdateCallback? onInteractionUpdate,
- PdfViewerDocumentChangedCallback? onDocumentChanged,
- PdfViewerCalculateInitialPageNumberFunction? calculateInitialPageNumber,
- PdfViewerCalculateCurrentPageNumberFunction? calculateCurrentPageNumber,
- PdfViewerReadyCallback? onViewerReady,
- PdfPageChangedCallback? onPageChanged,
- PdfViewerGetPageRenderingScale? getPageRenderingScale,
- double? scrollByMouseWheel = 0.2,
- double scrollByArrowKey = 25.0,
- int maxImageBytesCachedOnMemory = 100 * 1024 * 1024,
- double horizontalCacheExtent = 1.0,
- double verticalCacheExtent = 1.0,
- PdfViewerOverlaysBuilder? viewerOverlayBuilder,
- PdfPageOverlaysBuilder? pageOverlaysBuilder,
- PdfViewerLoadingBannerBuilder? loadingBannerBuilder,
- PdfViewerErrorBannerBuilder? errorBannerBuilder,
- PdfLinkWidgetBuilder? linkWidgetBuilder,
- List<
PdfViewerPagePaintCallback> ? pagePaintCallbacks, - List<
PdfViewerPagePaintCallback> ? pageBackgroundPaintCallbacks, - PdfViewerTextSelectionChangeCallback? onTextSelectionChange,
- PerPageSelectionAreaInjector? perPageSelectionAreaInjector,
- 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,
});