toJson method

Map<String, dynamic> toJson()

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;
}