BillBaseDto.fromJson constructor

BillBaseDto.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BillBaseDto.fromJson(Map<String, dynamic> json) {
  switch (decodeBillType(BillTypeEnumMap, json["type"] as String)) {
    case BillType.bill:
      return BillDto.fromJson(json);
    case BillType.billScan:
      return BillScanDto.fromJson(json);
  }
}