toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final height = this.height;
  final width = this.width;
  final x = this.x;
  final y = this.y;
  return {
    if (height != null) 'height': height,
    if (width != null) 'width': width,
    if (x != null) 'x': x,
    if (y != null) 'y': y,
  };
}