showAnnotationPropertiesView method
Displays the properties panel for the specified annotation. Only some annotation types are supported. If an unsupported type is passed in (such as eraser, unknown, signature, stamp, sound, image, link, etc.), an exception will be thrown.
Parameters:
annotationThe annotation CPDFAnnotation for which to display the properties panel.
Exceptions:
- If an unsupported annotation type is passed in, an Exception will be thrown
Example:
await controller.showAnnotationPropertiesView(annotation);
Implementation
Future<void> showAnnotationPropertiesView(CPDFAnnotation annotation) async {
const notSupportType = [
CPDFAnnotationType.ink_eraser,
CPDFAnnotationType.unknown,
CPDFAnnotationType.signature,
CPDFAnnotationType.stamp,
CPDFAnnotationType.sound,
CPDFAnnotationType.pictures,
CPDFAnnotationType.link,
];
if (notSupportType.contains(annotation.type)) {
throw Exception(
'This type:${annotation.type} of annotation is not supported, please select another type.');
}
return await _channel.invokeMethod(
'show_annotation_properties_view', annotation.toJson());
}