// To parse this JSON data, do // // final structureMaterialsIi = structureMaterialsIiFromJson(jsonString); import 'package:meta/meta.dart'; import 'dart:convert'; StructureMaterialsII structureMaterialsIiFromJson(String str) => StructureMaterialsII.fromJson(json.decode(str)); String structureMaterialsIiToJson(StructureMaterialsII data) => json.encode(data.toJson()); class StructureMaterialsII { final int? id; final int? bldgapprDetailsId; final List? foundation; final List? columns; final List? beams; final List? trussFraming; final List? roof; final List? flooring; final List? walls; final List? others; StructureMaterialsII( {this.id, this.bldgapprDetailsId, this.foundation, this.columns, this.beams, this.trussFraming, this.roof, this.flooring, this.walls, this.others}); factory StructureMaterialsII.fromJson(Map json) => StructureMaterialsII( id: json["id"], bldgapprDetailsId: json["bldgapprDetailsId"], foundation: List.from(json["foundation"].map((x) => x)), columns: List.from(json["columns"].map((x) => x)), beams: List.from(json["beams"].map((x) => x)), trussFraming: List.from(json["truss_framing"].map((x) => x)), roof: List.from(json["roof"].map((x) => x)), flooring: List.from(json["flooring"].map((x) => x)), walls: List.from(json["walls"].map((x) => x)), others: List.from(json["others"].map((x) => x)), ); factory StructureMaterialsII.fromJson2(Map json) => StructureMaterialsII( id: json["id"], bldgapprDetailsId: json["bldgapprDetailsId"], foundation: List.from(json["foundation"].map((x) => x)), columns: List.from(json["columns"].map((x) => x)), beams: List.from(json["beams"].map((x) => x)), trussFraming: List.from(json["trussFraming"].map((x) => x)), roof: List.from(json["roof"].map((x) => x)), flooring: List.from(json["flooring"].map((x) => x)), walls: List.from(json["walls"].map((x) => x)), others: List.from(json["others"].map((x) => x)), ); StructureMaterialsII copy( {int? id, int? bldgapprDetailsId, List? foundation, List? columns, List? beams, List? trussFraming, List? roof, List? flooring, List? walls, List? others}) => StructureMaterialsII( 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); Map toJson() => { "id": id, "bldgapprDetailsId": bldgapprDetailsId, "foundation": List.from(foundation!.map((x) => x)), "columns": List.from(columns!.map((x) => x)), "beams": List.from(beams!.map((x) => x)), "truss_framing": List.from(trussFraming!.map((x) => x)), "roof": List.from(roof!.map((x) => x)), "flooring": List.from(flooring!.map((x) => x)), "walls": List.from(walls!.map((x) => x)), "others": List.from(others!.map((x) => x)), }; }