CPDFTextAttribute.fromJson constructor

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

Implementation

factory CPDFTextAttribute.fromJson(Map<String, dynamic> json) {
  return CPDFTextAttribute(
    HexColor.fromHex(json['color'] ?? '#000000'),
    json['familyName'],
    json['styleName'],
    double.parse((json['fontSize'] as double).toStringAsFixed(2))
  );
}