toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var width = this.width;
  var height = this.height;

  final json = <String, Object?>{};
  if (width != null) {
    json[r'width'] = width;
  }
  if (height != null) {
    json[r'height'] = height;
  }
  return json;
}