AlhPdfView constructor
const
AlhPdfView({
- String? filePath,
- Uint8List? bytes,
- PDFViewCreatedCallback? onViewCreated,
- RenderCallback? onRender,
- PageChangedCallback? onPageChanged,
- ErrorCallback? onError,
- PageErrorCallback? onPageError,
- ZoomChangedCallback? onZoomChanged,
- Set<
Factory< ? gestureRecognizers,OneSequenceGestureRecognizer> > - LinkHandleCallback? onLinkHandle,
- FitPolicy fitPolicy = FitPolicy.both,
- bool fitEachPage = true,
- bool enableSwipe = true,
- bool swipeHorizontal = false,
- String password = '',
- bool nightMode = false,
- bool autoSpacing = true,
- bool pageFling = true,
- bool showScrollbar = true,
- bool pageSnap = true,
- int defaultPage = 0,
- Color backgroundColor = Colors.transparent,
- double defaultZoomFactor = 1.0,
- bool enableDoubleTap = true,
- double minZoom = 0.5,
- double maxZoom = 4.0,
- bool enableDefaultScrollHandle = false,
- int spacing = 0,
- Key? key,
Implementation
const AlhPdfView({
this.filePath,
this.bytes,
this.onViewCreated,
this.onRender,
this.onPageChanged,
this.onError,
this.onPageError,
this.onZoomChanged,
this.gestureRecognizers,
this.onLinkHandle,
this.fitPolicy = FitPolicy.both,
this.fitEachPage = true,
this.enableSwipe = true,
this.swipeHorizontal = false,
this.password = '',
this.nightMode = false,
this.autoSpacing = true,
this.pageFling = true,
this.showScrollbar = true,
this.pageSnap = true,
this.defaultPage = 0,
this.backgroundColor = Colors.transparent,
this.defaultZoomFactor = 1.0,
this.enableDoubleTap = true,
this.minZoom = 0.5,
this.maxZoom = 4.0,
this.enableDefaultScrollHandle = false,
this.spacing = 0,
super.key,
}) : assert(filePath != null || bytes != null),
assert(defaultZoomFactor > 0.0),
assert(minZoom > 0),
assert(maxZoom > 0);