toJson method

Map<String, Object?> toJson()

Implementation

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

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