AlhPdfView constructor

const AlhPdfView({
  1. String? filePath,
  2. Uint8List? bytes,
  3. PDFViewCreatedCallback? onViewCreated,
  4. RenderCallback? onRender,
  5. PageChangedCallback? onPageChanged,
  6. ErrorCallback? onError,
  7. PageErrorCallback? onPageError,
  8. ZoomChangedCallback? onZoomChanged,
  9. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
  10. LinkHandleCallback? onLinkHandle,
  11. FitPolicy fitPolicy = FitPolicy.both,
  12. bool fitEachPage = true,
  13. bool enableSwipe = true,
  14. bool swipeHorizontal = false,
  15. String password = '',
  16. bool nightMode = false,
  17. bool autoSpacing = true,
  18. bool pageFling = true,
  19. bool showScrollbar = true,
  20. bool pageSnap = true,
  21. int defaultPage = 0,
  22. Color backgroundColor = Colors.transparent,
  23. double defaultZoomFactor = 1.0,
  24. bool enableDoubleTap = true,
  25. double minZoom = 0.5,
  26. double maxZoom = 4.0,
  27. bool enableDefaultScrollHandle = false,
  28. int spacing = 0,
  29. 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);