toJson method

Map<String, Object?> toJson()

Implementation

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

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