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