// To parse this JSON data, do // // final pro = proFromJson(jsonString); import 'dart:convert'; List proFromJson(String str) => List.from(json.decode(str).map((x) => Pro.fromJson(x))); String proToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); class Pro { int id; int userId; int procedureCode; String procedure; String placeOfService; int totalBeneficiaries; int totalServices; int totalBeneDayServices; int programYear; Pro({ required this.id, required this.userId, required this.procedureCode, required this.procedure, required this.placeOfService, required this.totalBeneficiaries, required this.totalServices, required this.totalBeneDayServices, required this.programYear, }); factory Pro.fromJson(Map json) => Pro( id: json["id"], userId: json["user_id"], procedureCode: json["Procedure code"], procedure: json["Procedure"], placeOfService: json["Place of Service"], totalBeneficiaries: json["Total Beneficiaries"], totalServices: json["Total Services"], totalBeneDayServices: json["Total_bene_day_services"], programYear: json["Program year"], ); Map toJson() => { "id": id, "user_id": userId, "Procedure code": procedureCode, "Procedure": procedure, "Place of Service": placeOfService, "Total Beneficiaries": totalBeneficiaries, "Total Services": totalServices, "Total_bene_day_services": totalBeneDayServices, "Program year": programYear, }; }