CPDFCircleAnnotation.fromJson constructor

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

Implementation

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