UPdfViewer constructor
const
UPdfViewer({
- String? base64Pdf,
- Uint8List? bytes,
- String? url,
- String? filePath,
- String? asset,
- UPdfController? controller,
- UPdfEditController? editController,
- UDocAnnotationController? annotations,
- String password = "",
- int initialPage = 0,
- String? title,
- bool showToolbar = true,
- bool showBottomBar = true,
- bool showSidebar = true,
- bool showScrollThumb = true,
- bool showBackButton = false,
- bool allowSelection = true,
- bool allowCopy = true,
- bool enableMarkup = true,
- bool enableAnnotations = false,
- bool enableDrawing = true,
- UDocDrawController? drawController,
- List<
UDocMarkupKind> markupKinds = UDocMarkupKind.values, - String? annotationData,
- String? annotationStorageKey,
- bool persistAnnotations = true,
- void onAnnotationsChanged(
- String data
- UDocNoteDisplay noteDisplay = UDocNoteDisplay.badge,
- UDocTextGeometry textGeometry = UDocTextGeometry.auto,
- String? savePath,
- UDocScrollMode scrollMode = UDocScrollMode.verticalContinuous,
- UDocSpread spread = UDocSpread.none,
- UDocDirection? direction,
- UDocColorMode colorMode = UDocColorMode.normal,
- Map<
String, String> ? headers, - UDocWatermark? watermark,
- UPdfPageOverlayBuilder? pageOverlayBuilder,
- bool secure = false,
- List<
Widget> actions = const <Widget>[], - void onControllerReady(
- UPdfController controller
- void onPageChanged(
- int pageIndex
- void onLinkTapped(
- UDocLink link
- VoidCallback? onBack,
- 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");