CPDFReaderWidget class viewer-ui

PDF reader widget for viewing and interacting with documents.

This widget embeds a native PDF viewer using Flutter platform views.

Note: This widget only supports Android and iOS.

Inheritance

Constructors

CPDFReaderWidget({Key? key, required String document, String? password = '', required CPDFConfiguration configuration, int pageIndex = 0, required CPDFReaderWidgetCreatedCallback onCreated, bool useHybridComposition = false, CPDFPageChangedCallback? onPageChanged, CPDFDocumentSaveCallback? onSaveCallback, CPDFPageEditDialogBackPressCallback? onPageEditDialogBackPress, CPDFFillScreenChangedCallback? onFillScreenChanged, CPDFIOSClickBackPressedCallback? onIOSClickBackPressed, CPDFOnTapMainDocAreaCallback? onTapMainDocAreaCallback, CPDFOnCustomToolbarItemTappedCallback? onCustomToolbarItemTappedCallback, CPDFOnSearchBackButtonTappedCallback? onSearchBackButtonTappedCallback, CPDFOnAddWatermarkDialogDismissedCallback? onAddWatermarkDialogDismissedCallback, CPDFOnAnnotationStyleDialogDismissedCallback? onAnnotationStyleDialogDismissedCallback, CPDFOnFormStyleDialogDismissedCallback? onFormStyleDialogDismissedCallback, CPDFOnContentEditorStyleDialogDismissedCallback? onContentEditorStyleDialogDismissedCallback, CPDFOnAnnotationCreationPreparedCallback? onAnnotationCreationPreparedCallback, CPDFOnCustomContextMenuItemTappedCallback? onCustomContextMenuItemTappedCallback, CPDFOnInterceptAnnotationActionCallback? onInterceptAnnotationActionCallback, CPDFOnInterceptWidgetActionCallback? onInterceptWidgetActionCallback})
init callback
const

Properties

configuration → CPDFConfiguration
Initial ComPDFKit SDK configuration.
final
document → String
Local PDF file path.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAddWatermarkDialogDismissedCallback → CPDFOnAddWatermarkDialogDismissedCallback?
Called when the add watermark dialog is dismissed.
final
onAnnotationCreationPreparedCallback → CPDFOnAnnotationCreationPreparedCallback?
final
onAnnotationStyleDialogDismissedCallback → CPDFOnAnnotationStyleDialogDismissedCallback?
Called when the annotation style dialog is dismissed.
final
onContentEditorStyleDialogDismissedCallback → CPDFOnContentEditorStyleDialogDismissedCallback?
Called when the content editor style dialog is dismissed.
final
onCreated → CPDFReaderWidgetCreatedCallback
final
onCustomContextMenuItemTappedCallback → CPDFOnCustomContextMenuItemTappedCallback?
final
onCustomToolbarItemTappedCallback → CPDFOnCustomToolbarItemTappedCallback?
final
onFillScreenChanged → CPDFFillScreenChangedCallback?
final
onFormStyleDialogDismissedCallback → CPDFOnFormStyleDialogDismissedCallback?
Called when the form style dialog is dismissed.
final
onInterceptAnnotationActionCallback → CPDFOnInterceptAnnotationActionCallback?
final
onInterceptWidgetActionCallback → CPDFOnInterceptWidgetActionCallback?
final
onIOSClickBackPressed → CPDFOnAddWatermarkDialogDismissedCallback?
final
onPageChanged → CPDFPageChangedCallback?
final
onPageEditDialogBackPress → CPDFOnAddWatermarkDialogDismissedCallback?
final
onSaveCallback → CPDFOnAddWatermarkDialogDismissedCallback?
final
onSearchBackButtonTappedCallback → CPDFOnAddWatermarkDialogDismissedCallback?
Called when the search view back button is tapped.
final
onTapMainDocAreaCallback → CPDFOnAddWatermarkDialogDismissedCallback?
final
pageIndex → int
Initial page index.
final
password → String?
Optional document password.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useHybridComposition → bool
Whether to use hybrid composition on Android.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<CPDFReaderWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited