toJson method
Implementation
Map<String, Object?> toJson() {
var name = this.name;
var type = this.type;
final json = <String, Object?>{};
if (name != null) {
json[r'name'] = name;
}
if (type != null) {
json[r'type'] = type;
}
return json;
}