CPDFSquareAnnotation.fromJson constructor
CPDFSquareAnnotation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CPDFSquareAnnotation.fromJson(Map<String, dynamic> json) {
final common = CPDFAnnotation.fromJson(json);
return CPDFSquareAnnotation(
type: common.type,
title: common.title,
page: common.page,
content: common.content,
uuid: common.uuid,
createDate: common.createDate,
rect: common.rect,
borderWidth: json['borderWidth'] ?? 0,
borderColor: HexColor.fromHex(json['borderColor'] ?? '#000000'),
borderAlpha: json['borderAlpha'] ?? 255,
fillColor: HexColor.fromHex(json['fillColor'] ?? '#000000'),
fillAlpha: json['fillAlpha'] ?? 255,
effectType: CPDFBorderEffectType.fromString(json['bordEffectType'])
);
}