CPDFComboBoxWidget.fromJson constructor
CPDFComboBoxWidget.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CPDFComboBoxWidget.fromJson(Map<String, dynamic> json) {
CPDFWidget common = CPDFWidget.fromJson(json);
return CPDFComboBoxWidget(
title: common.title,
page: common.page,
uuid: common.uuid,
createDate: common.createDate,
rect: common.rect,
borderColor: common.borderColor,
fillColor: common.fillColor,
borderWidth: common.borderWidth,
options: json['options'] != null
? (json['options'] as List)
.map((e) =>
CPDFWidgetItem.fromJson(Map<String, dynamic>.from(e)))
.toList()
: null,
selectItemAtIndex: json['selectItemAtIndex'] ?? 0,
fontColor: HexColor.fromHex(json['fontColor'] ?? '#000000'),
fontSize: (json['fontSize'] as num?)?.toDouble() ?? 20.0,
familyName: json['familyName'] ?? 'Helvetica',
styleName: json['styleName'] ?? '');
}