// To parse this JSON data, do // // final propertyAppraisal = propertyAppraisalFromJson(jsonString); import 'dart:convert'; PropertyAppraisal propertyAppraisalFromJson(String str) => PropertyAppraisal.fromJson(json.decode(str)); String propertyAppraisalToJson(PropertyAppraisal data) => json.encode(data.toJson()); class PropertyAppraisal { final int id; final int bldgapprDetailsId; final String unitconstructCost; final String buildingCore; final String unitconstructSubtotal; final String depreciationRate; final String depreciationCost; final String costAddItems; final String addItemsSubtotal; final String totalpercentDepreciation; final String marketValue; PropertyAppraisal({ required this.id, required this.bldgapprDetailsId, required this.unitconstructCost, required this.buildingCore, required this.unitconstructSubtotal, required this.depreciationRate, required this.depreciationCost, required this.costAddItems, required this.addItemsSubtotal, required this.totalpercentDepreciation, required this.marketValue, }); factory PropertyAppraisal.fromJson(Map json) => PropertyAppraisal( id: json["id"], bldgapprDetailsId: json["bldgappr_details_id"], unitconstructCost: json["unitconstruct_cost"], buildingCore: json["building_core"], unitconstructSubtotal: json["unitconstruct_subtotal"], depreciationRate: json["depreciation_rate"], depreciationCost: json["depreciation_cost"], costAddItems: json["cost_add_items"], addItemsSubtotal: json["add_items_subtotal"], totalpercentDepreciation: json["totalpercent_depreciation"], marketValue: json["market_value"], ); Map toJson() => { "id": id, "bldgappr_details_id": bldgapprDetailsId, "unitconstruct_cost": unitconstructCost, "building_core": buildingCore, "unitconstruct_subtotal": unitconstructSubtotal, "depreciation_rate": depreciationRate, "depreciation_cost": depreciationCost, "cost_add_items": costAddItems, "add_items_subtotal": addItemsSubtotal, "totalpercent_depreciation": totalpercentDepreciation, "market_value": marketValue, }; }