exportTextStyle function
Implementation
Map<String, dynamic>? exportTextStyle(TextStyle? textStyle) {
if (textStyle == null) {
return null;
}
return <String, dynamic>{
"color": textStyle.color != null
? textStyle.color!.value.toRadixString(16)
: null,
"debugLabel": textStyle.debugLabel,
"decoration": exportTextDecoration(textStyle.decoration),
"fontSize": textStyle.fontSize,
"fontFamily": textStyle.fontFamily,
"fontStyle": FontStyle.italic == textStyle.fontStyle ? "italic" : "normal",
"fontWeight": exportFontWeight(textStyle.fontWeight),
};
}