setPropertiesForAnnotation method

Future<void> setPropertiesForAnnotation(
  1. Annot annotation,
  2. AnnotProperty property
)

Sets properties for the specified annotation in the current document.

Annot pdf = new Annot('pdf', 1);
AnnotProperty property = new AnnotProperty();

property.rect = new Rect.fromCoordinates(1, 1.5, 100.2, 100);
property.contents = 'Hello World';
property.subject = 'sample';
property.title = 'set-props-for-annot';
property.rotation = 90;

await controller.setPropertiesForAnnotation(pdf, property);

Implementation

Future<void> setPropertiesForAnnotation(
    Annot annotation, AnnotProperty property) {
  return _channel
      .invokeMethod(Functions.setPropertiesForAnnotation, <String, dynamic>{
    Parameters.annotation: jsonEncode(annotation),
    Parameters.annotationProperties: jsonEncode(property),
  });
}