toJson method

Map<String, Object?> toJson()

Implementation

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

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