UPdfViewer constructor

const UPdfViewer({
  1. required PdfViewerSource source,
  2. Key? key,
  3. int initialPageNumber = 1,
  4. double initialZoomLevel = 1.0,
  5. double maxZoomLevel = 3.0,
  6. PdfScrollDirection scrollDirection = PdfScrollDirection.vertical,
  7. bool enableAnnotations = true,
  8. bool enableTextSelection = true,
  9. void onPageChanged(
    1. PdfPageChangedDetails
    )?,
  10. void onZoomChanged(
    1. PdfZoomLevelChangedCallback
    )?,
  11. void onError(
    1. dynamic
    )?,
  12. Widget? loadingIndicator,
  13. Widget? errorIndicator,
  14. bool showLoading = true,
  15. BoxConstraints? constraints,
  16. EdgeInsets padding = EdgeInsets.zero,
  17. PdfViewerController? controller,
  18. void onDocumentLoaded(
    1. PdfDocumentLoadedDetails
    )?,
  19. void onDocumentLoadFailed(
    1. PdfDocumentLoadFailedDetails
    )?,
  20. Widget? searchBar,
})

Implementation

const UPdfViewer({
  required this.source,
  super.key,
  this.initialPageNumber = 1,
  this.initialZoomLevel = 1.0,
  this.maxZoomLevel = 3.0,
  this.scrollDirection = PdfScrollDirection.vertical,
  this.enableAnnotations = true,
  this.enableTextSelection = true,
  this.onPageChanged,
  this.onZoomChanged,
  this.onError,
  this.loadingIndicator,
  this.errorIndicator,
  this.showLoading = true,
  this.constraints,
  this.padding = EdgeInsets.zero,
  this.controller,
  this.onDocumentLoaded,
  this.onDocumentLoadFailed,
  this.searchBar,
});