toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'fontSize': fontSize,
'fontWeight': fontWeight.toString(),
'fontStyle': fontStyle?.index,
'color': color?.toHex(),
'backgroundColor': backgroundColor?.toHex(),
'decoration': decoration.toString(),
'decorationColor': decorationColor?.toHex(),
'decorationStyle': decorationStyle?.index,
'decorationThickness': decorationThickness,
'fontFamily': fontFamily,
'fontFeatures': fontFeatures?.map((e) => e.toString()).toList(),
'letterSpacing': letterSpacing,
'wordSpacing': wordSpacing,
'height': height,
'locale': locale?.toLanguageTag(),
'textBaseline': textBaseline?.index,
};
}