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. FitPolicy fitPolicy = FitPolicy.both,
  11. bool fitEachPage = true,
  12. bool enableSwipe = true,
  13. bool swipeHorizontal = false,
  14. String password = '',
  15. bool nightMode = false,
  16. bool autoSpacing = true,
  17. bool pageFling = true,
  18. bool pageSnap = true,
  19. int defaultPage = 0,
  20. Color backgroundColor = Colors.transparent,
  21. double defaultZoomFactor = 1.0,
  22. bool enableDoubleTap = true,
  23. double minZoom = 0.5,
  24. double maxZoom = 4.0,
  25. bool enableDefaultScrollHandle = false,
  26. Key? key,
})

Implementation

const AlhPdfView({
  this.filePath,
  this.bytes,
  this.onViewCreated,
  this.onRender,
  this.onPageChanged,
  this.onError,
  this.onPageError,
  this.onZoomChanged,
  this.gestureRecognizers,
  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.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,
  Key? key,
})  : assert(filePath != null || bytes != null),
      assert(defaultZoomFactor > 0.0),
      assert(minZoom > 0),
      assert(maxZoom > 0),
      super(key: key);