CPDFFreeTextAnnotation.fromJson constructor

CPDFFreeTextAnnotation.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CPDFFreeTextAnnotation.fromJson(Map<String, dynamic> json) {
  final common = CPDFAnnotation.fromJson(json);
  return CPDFFreeTextAnnotation(
    type: common.type,
    title: common.title,
    page: common.page,
    content: common.content,
    uuid: common.uuid,
    createDate: common.createDate,
    rect: common.rect,
    textAttribute: CPDFTextAttribute.fromJson(
        Map<String, dynamic>.from(json['textAttribute'] ?? {})),
    alpha: json['alpha'] ?? 255.0,
    alignment: CPDFAlignment.fromString(json['alignment']),
  );
}