getAnnotationMarkState method

Future<CPDFAnnotationMarkState> getAnnotationMarkState(
  1. CPDFAnnotation annotation
)

Gets the mark state of an annotation or annotation reply.

Example:

final annotation = (await document.pageAtIndex(0).getAnnotations()).first;
final state = await document.getAnnotationMarkState(annotation);
debugPrint('Mark state: $state');

final replies = await document.getAnnotationReplies(annotation);
if (replies.isNotEmpty) {
  final replyState = await document.getAnnotationMarkState(replies.first);
  debugPrint('Reply mark state: $replyState');
}

Since v2.6.8

Implementation

Future<CPDFAnnotationMarkState> getAnnotationMarkState(
  CPDFAnnotation annotation,
) async {
  final result = await _channel.invokeMethod('get_annotation_mark_state', {
    ..._annotationIdentityArgs(annotation),
  });
  return CPDFAnnotationMarkState.fromString(result as String?);
}