UPdfViewer constructor

const UPdfViewer({
  1. String? base64Pdf,
  2. Uint8List? bytes,
  3. String? url,
  4. String? filePath,
  5. String? asset,
  6. UPdfController? controller,
  7. UPdfEditController? editController,
  8. UDocAnnotationController? annotations,
  9. String password = "",
  10. int initialPage = 0,
  11. String? title,
  12. bool showToolbar = true,
  13. bool showBottomBar = true,
  14. bool showSidebar = true,
  15. bool showScrollThumb = true,
  16. bool showBackButton = false,
  17. bool allowSelection = true,
  18. bool allowCopy = true,
  19. bool allowShare = true,
  20. bool enableMarkup = true,
  21. bool enableAnnotations = false,
  22. bool enableDrawing = true,
  23. UDocDrawController? drawController,
  24. List<UDocMarkupKind> markupKinds = UDocMarkupKind.values,
  25. String? annotationData,
  26. String? annotationStorageKey,
  27. bool persistAnnotations = true,
  28. void onAnnotationsChanged(
    1. String data
    )?,
  29. UDocNoteDisplay noteDisplay = UDocNoteDisplay.badge,
  30. UDocTextGeometry textGeometry = UDocTextGeometry.auto,
  31. String? savePath,
  32. UDocScrollMode scrollMode = UDocScrollMode.verticalContinuous,
  33. UDocSpread spread = UDocSpread.none,
  34. UDocDirection? direction,
  35. UDocColorMode colorMode = UDocColorMode.normal,
  36. Map<String, String>? headers,
  37. UDocWatermark? watermark,
  38. UPdfPageOverlayBuilder? pageOverlayBuilder,
  39. bool secure = false,
  40. List<Widget> actions = const <Widget>[],
  41. void onControllerReady(
    1. UPdfController controller
    )?,
  42. void onPageChanged(
    1. int pageIndex
    )?,
  43. void onLinkTapped(
    1. UDocLink link
    )?,
  44. VoidCallback? onBack,
  45. Key? key,
})

Implementation

const UPdfViewer({
  this.base64Pdf,
  this.bytes,
  this.url,
  this.filePath,
  this.asset,
  this.controller,
  this.editController,
  this.annotations,
  this.password = "",
  this.initialPage = 0,
  this.title,
  this.showToolbar = true,
  this.showBottomBar = true,
  this.showSidebar = true,
  this.showScrollThumb = true,
  this.showBackButton = false,
  this.allowSelection = true,
  this.allowCopy = true,
  this.allowShare = true,
  this.enableMarkup = true,
  this.enableAnnotations = false,
  this.enableDrawing = true,
  this.drawController,
  this.markupKinds = UDocMarkupKind.values,
  this.annotationData,
  this.annotationStorageKey,
  this.persistAnnotations = true,
  this.onAnnotationsChanged,
  this.noteDisplay = UDocNoteDisplay.badge,
  this.textGeometry = UDocTextGeometry.auto,
  this.savePath,
  this.scrollMode = UDocScrollMode.verticalContinuous,
  this.spread = UDocSpread.none,
  this.direction,
  this.colorMode = UDocColorMode.normal,
  this.headers,
  this.watermark,
  this.pageOverlayBuilder,
  this.secure = false,
  this.actions = const <Widget>[],
  this.onControllerReady,
  this.onPageChanged,
  this.onLinkTapped,
  this.onBack,
  super.key,
}) : assert(base64Pdf != null || bytes != null || url != null || filePath != null || asset != null || controller != null, "Provide one PDF source");