toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
if (this.price != null) {
data['price'] = this.price!.toJson();
}
data['name'] = this.name;
data['label'] = this.label;
data['id'] = this.id;
return data;
}