CPDFLineAnnotation.fromJson constructor
CPDFLineAnnotation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CPDFLineAnnotation.fromJson(Map<String, dynamic> json) {
final common = CPDFAnnotation.fromJson(json);
return CPDFLineAnnotation(
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.0,
fillColor: HexColor.fromHex(json['fillColor'] ?? '#000000'),
fillAlpha: json['fillAlpha'] ?? 255.0,
lineHeadType: CPDFLineType.fromString(json['lineHeadType']),
lineTailType: CPDFLineType.fromString(json['lineTailType']),
);
}