// 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 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.foundation, this.columns, this.beams, this.trussFraming, this.roof, this.flooring, this.walls, this.others}); factory StructureMaterialsII.fromJson(Map json) => StructureMaterialsII( id: json["id"], 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)), ); Map toJson() => { "id": id, "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)), }; }