showDefaultAnnotationPropertiesView method
Displays the default properties panel for the specified annotation type.
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:
typeThe annotation type CPDFAnnotationType for which to display the properties panel.
Exceptions:
- If an unsupported annotation type is passed in, an Exception will be thrown.
Example:
await controller.showDefaultAnnotationPropertiesView(CPDFAnnotationType.highlight);
Implementation
Future<void> showDefaultAnnotationPropertiesView(
CPDFAnnotationType type) async {
const notSupportType = [
CPDFAnnotationType.ink_eraser,
CPDFAnnotationType.unknown,
CPDFAnnotationType.signature,
CPDFAnnotationType.stamp,
CPDFAnnotationType.sound,
CPDFAnnotationType.pictures,
CPDFAnnotationType.link,
];
if (notSupportType.contains(type)) {
throw Exception(
'This type:$type of annotation is not supported, please select another type.');
}
return await _channel.invokeMethod(
'show_default_annotation_properties_view', type.name);
}