toJson method

Map<String, Object?> toJson()

Implementation

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

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