toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (x != null) map['x'] = x;
if (y != null) map['y'] = y;
if (width != null) map['width'] = width;
if (height != null) map['height'] = height;
return map;
}