toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['display'] = display;
data['color'] = color;
data['fontSize'] = fontSize;
data['fontWeight'] = fontWeight;
data['fontFamily'] = fontFamily;
if (text != null) {
data['text'] = text!.toJson();
}
return data;
}