exportAnnotations method

Future<String?> exportAnnotations(
  1. List<Annot>? annotationList
)

Exports the specified annotations in the current document as a XFDF annotation string.

List<Annot> annotList = new List<Annot>.empty(growable: true);
annotList.add(new Annot('Hello', 1));
annotList.add(new Annot('World', 2));

var xfdf = await controller.exportAnnotations(annotList);

If annotationList is null, exports all annotations from the current document; else exports the valid ones specified.

Implementation

Future<String?> exportAnnotations(List<Annot>? annotationList) async {
  if (annotationList == null) {
    return _channel.invokeMethod(Functions.exportAnnotations);
  } else {
    return _channel.invokeMethod(
        Functions.exportAnnotations, <String, dynamic>{
      Parameters.annotations: jsonEncode(annotationList)
    });
  }
}