CPDFAnnotationsConfig class

Constructors

CPDFAnnotationsConfig({List<CPDFAnnotationType> availableTypes = CPDFAnnotationType.values, List<CPDFConfigTool> availableTools = CPDFConfigTool.values, CPDFAnnotAttribute initAttribute = const CPDFAnnotAttribute(), String annotationAuthor = "", bool autoShowSignPicker = true, bool autoShowPicPicker = true, bool autoShowStampPicker = true, bool autoShowLinkDialog = true, bool autoShowNoteEditDialog = true, bool interceptNoteAction = false, bool interceptLinkAction = false})
const

Properties

annotationAuthor → String
In the V2.1.0 version, a new comment reply function is added, and the name of the comment author can be set here.
final
autoShowLinkDialog → bool
In annotation mode, when tapping the bottom toolbar or calling controller.setAnnotationMode(CPDFAnnotationType.link), whether to automatically show the link settings dialog after the link area is drawn on the screen. Default: true. If set to false, the link settings dialog will not be displayed. You can handle link configuration yourself via the CPDFReaderWidget(onAnnotationCreationPreparedCallback: ...) callback. For example, show a custom link dialog, then call controller.prepareNextLink(String link) with the configured link; a subsequent tap will add the custom link to the PDF.
final
autoShowNoteEditDialog → bool
In annotation mode, when tapping the PDF page after selecting CPDFAnnotationType.note, whether to automatically show the default note edit dialog. Default: true. If set to false, the default note edit dialog will not be displayed. You can handle note content editing yourself via the CPDFReaderWidget(onAnnotationCreationPreparedCallback: ...) callback, then call controller.document.updateAnnotation(annotation) to save the custom content or controller.document.removeAnnotation(annotation) to cancel the created note.
final
autoShowPicPicker → bool
In annotation mode, when tapping the bottom toolbar or calling controller.setAnnotationMode(CPDFAnnotationType.picture), whether to automatically show the picture picker dialog. Default: true. If set to false, the picture picker dialog will not be displayed. You can handle picture selection yourself via the CPDFReaderWidget(onAnnotationCreationPreparedCallback: ...) callback. For example, show a custom image picker, then call controller.prepareNextPicture(String imagePath) with the chosen image path; a subsequent tap will add the custom image to the PDF.
final
autoShowSignPicker → bool
In annotation mode, when tapping the bottom toolbar or calling controller.setAnnotationMode(CPDFAnnotationType.signature), whether to automatically show the signature picker dialog. Default: true. If set to false, the signature picker dialog will not be displayed. You can handle signature selection yourself via the CPDFReaderWidget(onAnnotationCreationPreparedCallback: ...) callback. For example, show a custom signature picker, then call controller.prepareNextSignature(String signPath) with the chosen signature path; a subsequent tap will place the custom signature into the PDF.
final
autoShowStampPicker → bool
In annotation mode, when tapping the bottom toolbar or calling controller.setAnnotationMode(CPDFAnnotationType.stamp), whether to automatically show the stamp picker dialog. Default: true. If set to false, the stamp picker dialog will not be displayed. You can handle stamp selection yourself via the CPDFReaderWidget(onAnnotationCreationPreparedCallback: ...) callback. For example, show a custom stamp picker, then call controller.prepareNextStamp(String stampPath) with the chosen stamp path; a subsequent tap will add the custom stamp to the PDF.
final
availableTools → List<CPDFConfigTool>
CPDFViewMode.annotations mode, annotation tools shown at the bottom of the view.
final
availableTypes → List<CPDFAnnotationType>
CPDFViewMode.annotations mode, list of annotation functions shown at the bottom of the view.
final
hashCode → int
The hash code for this object.
no setterinherited
initAttribute → CPDFAnnotAttribute
When adding an annotation, the annotation’s default attributes.
final
interceptLinkAction → bool
Intercept click actions on existing link annotations. Default is false (not intercepted). Clicking a link annotation will directly execute the link jump action. When set to true, the click event is intercepted via CPDFReaderWidget.onInterceptAnnotationActionCallback. Developers can handle custom link jump actions through the callback.
final
interceptNoteAction → bool
Intercept click actions on existing note annotations. Default is false (not intercepted). Clicking a note annotation will directly pop up the note content editing dialog. When set to true, the click event is intercepted via CPDFReaderWidget.onInterceptAnnotationActionCallback. Developers can handle custom note content editing dialogs through the callback.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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