PDFView constructor

const PDFView({
  1. Key? key,
  2. String? filePath,
  3. Uint8List? pdfData,
  4. PDFViewCreatedCallback? onViewCreated,
  5. RenderCallback? onRender,
  6. PageChangedCallback? onPageChanged,
  7. ErrorCallback? onError,
  8. PageErrorCallback? onPageError,
  9. LinkHandlerCallback? onLinkHandler,
  10. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
  11. bool enableSwipe = true,
  12. bool swipeHorizontal = false,
  13. String? password,
  14. bool nightMode = false,
  15. bool autoSpacing = true,
  16. bool pageFling = true,
  17. bool pageSnap = true,
  18. bool fitEachPage = true,
  19. int defaultPage = 0,
  20. FitPolicy fitPolicy = FitPolicy.WIDTH,
  21. bool preventLinkNavigation = false,
})

Implementation

const PDFView({
  Key? key,
  this.filePath,
  this.pdfData,
  this.onViewCreated,
  this.onRender,
  this.onPageChanged,
  this.onError,
  this.onPageError,
  this.onLinkHandler,
  this.gestureRecognizers,
  this.enableSwipe = true,
  this.swipeHorizontal = false,
  this.password,
  this.nightMode = false,
  this.autoSpacing = true,
  this.pageFling = true,
  this.pageSnap = true,
  this.fitEachPage = true,
  this.defaultPage = 0,
  this.fitPolicy = FitPolicy.WIDTH,
  this.preventLinkNavigation = false,
})  : assert(filePath != null || pdfData != null),
      super(key: key);