toJson method
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'source': source.name,
'value': value,
if (height != null) 'height': height,
if (heightRatio != null) 'heightRatio': heightRatio,
if (backgroundColor != null) 'backgroundColor': backgroundColor,
};