toJson static method
Converts TextStyle to JSON map
Implementation
static Map<String, dynamic>? toJson(TextStyle? textStyle) {
if (textStyle == null) return null;
return {
'color': textStyle.color?.value,
'fontSize': textStyle.fontSize,
'fontWeight': textStyle.fontWeight?.index,
'letterSpacing': textStyle.letterSpacing,
'wordSpacing': textStyle.wordSpacing,
};
}