toJson method
Implementation
Map<String, dynamic> toJson() => {
"backgroundColor": backgroundColor != null
? "#${backgroundColor.value.toRadixString(16)}"
: null,
"fontSize": fontSize,
"color": color != null ? "#${color.value.toRadixString(16)}" : null,
"isVisible": isVisible,
};