toJson method
Implementation
@override
Map<String, dynamic> toJson() => {
"shape": shapeName,
"x": x,
"y": y,
"width": width,
"height": height,
if (color != null) "color": color.toString(),
if (strokeSize != null) 'strokeSize': strokeSize,
if (backgroundColor != null)
"backgroundColor": backgroundColor.toString(),
};