StyleEntity.fromJson constructor
StyleEntity.fromJson(
- Map<String, dynamic> jsonRes
)
Implementation
factory StyleEntity.fromJson(Map<String, dynamic> jsonRes) => StyleEntity(
fontWeight: editableCellFontWeight[
asT<String?>(jsonRes['font_weight']) ?? 'normal'],
fontSize: asT<double?>(jsonRes['font_size']),
fontColor: hexStringToColor(asT<String?>(jsonRes['font_color'])),
backgroundColor:
hexStringToColor(asT<String?>(jsonRes['background_color'])),
horizontalAlignment: editableHorizontalAlignment[
asT<String?>(jsonRes['horizontal_alignment'])],
verticalAlignment: editableCellVerticalAlignment[
asT<String?>(jsonRes['vertical_alignment'])],
textAlign: editableCellTextAlign[asT<String?>(jsonRes['text_align'])],
);