getAnnotationReplies method
Gets all replies attached to an annotation.
Returned reply objects include their CPDFReplyAnnotation.content, CPDFReplyAnnotation.markState, and CPDFReplyAnnotation.reviewState. Native mark/review state replies are kept as implementation details and are not exposed through a separate reply type.
Example:
final annotations = await document.pageAtIndex(0).getAnnotations();
if (annotations.isNotEmpty) {
final replies = await document.getAnnotationReplies(annotations.first);
debugPrint('Reply count: ${replies.length}');
if (replies.isNotEmpty) {
debugPrint('First reply content: ${replies.first.content}');
debugPrint('First reply mark state: ${replies.first.markState.name}');
}
}
Since v2.6.8
Implementation
Future<List<CPDFReplyAnnotation>> getAnnotationReplies(
CPDFAnnotation annotation,
) async {
final result = await _channel.invokeMethod('get_annotation_replies', {
'page_index': annotation.page,
'uuid': annotation.uuid,
});
if (result is List) {
return result
.whereType<Map>()
.map((item) => _replyFromJson(Map<String, dynamic>.from(item)))
.toList();
}
return [];
}