// To parse this JSON data, do // // final structureMaterials = structureMaterialsFromJson(jsonString); import 'package:meta/meta.dart'; import 'dart:convert'; StructureMaterials structureMaterialsFromJson(String str) => StructureMaterials.fromJson(json.decode(str)); String structureMaterialsToJson(StructureMaterials data) => json.encode(data.toJson()); class StructureMaterials { final int? id; final int? bldgapprDetailsId; final String? foundation; final String? columns; final String? beams; final String? trussFraming; final String? roof; final String? flooring; final String? walls; final String? others; StructureMaterials( {this.id, this.bldgapprDetailsId, this.foundation, this.columns, this.beams, this.trussFraming, this.roof, this.flooring, this.walls, this.others}); StructureMaterials copy( {int? id, int? bldgapprDetailsId, String? foundation, String? columns, String? beams, String? trussFraming, String? roof, String? flooring, String? walls, String? others}) => StructureMaterials( id: id ?? this.id, bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId, foundation: foundation ?? this.foundation, columns: columns ?? this.columns, beams: beams ?? this.beams, trussFraming: trussFraming ?? this.trussFraming, roof: roof ?? this.roof, flooring: flooring ?? this.flooring, walls: walls ?? this.walls, others: others ?? this.others); factory StructureMaterials.fromJson(Map json) => StructureMaterials( id: json["id"], bldgapprDetailsId: json["bldgappr_details_id"], foundation: json["foundation"], columns: json["columns"], beams: json["beams"], trussFraming: json["truss_framing"], roof: json["roof"], flooring: json["flooring"], walls: json["walls"], others: json["others"]); factory StructureMaterials.fromJson2(Map json) => StructureMaterials( id: json["id"], bldgapprDetailsId: json["bldgapprDetailsId"], foundation: json["foundation"], columns: json["columns"], beams: json["beams"], trussFraming: json["trussFraming"], roof: json["roof"], flooring: json["flooring"], walls: json["walls"], others: json["others"]); Map toJson() => { "id": id, "bldgappr_details_id": bldgapprDetailsId, "foundation": foundation, "columns": columns, "beams": beams, "truss_framing": trussFraming, "roof": roof, "flooring": flooring, "walls": walls, "others": others }; }