toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var self = this.self;
  var id = this.id;
  var key = this.key;
  var colorName = this.colorName;
  var name = this.name;

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