toMap method
Implementation
Map<String, dynamic> toMap() {
return {
"color": colorToHex(color),
"background_color": colorToHex(backgroundColor),
"font_size": fontSize,
"font_weight": fontWeightToString(fontWeight),
"font_style": fontStyle,
"letter_spacing": letterSpacing,
"word_spacing": wordSpacing,
"height": height,
"font_family": fontFamily,
"overflow": overflow,
"text_align": textAlign,
"soft_wrap": softWrap,
"max_lines": maxLines,
"border_radius": borderRadius,
"minimum_size": minimumSize,
"fixed_size": fixedSize,
"maximum_size": maximumSize,
"object_fit": objectFit?.name
};
}