102 lines
3.8 KiB
Dart
102 lines
3.8 KiB
Dart
// 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<String>? foundation;
|
|
final List<String>? columns;
|
|
final List<String>? beams;
|
|
final List<String>? trussFraming;
|
|
final List<String>? roof;
|
|
final List<String>? flooring;
|
|
final List<String>? walls;
|
|
final List<String>? 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<String, dynamic> json) =>
|
|
StructureMaterialsII(
|
|
id: json["id"],
|
|
bldgapprDetailsId: json["bldgapprDetailsId"],
|
|
foundation: List<String>.from(json["foundation"].map((x) => x)),
|
|
columns: List<String>.from(json["columns"].map((x) => x)),
|
|
beams: List<String>.from(json["beams"].map((x) => x)),
|
|
trussFraming: List<String>.from(json["truss_framing"].map((x) => x)),
|
|
roof: List<String>.from(json["roof"].map((x) => x)),
|
|
flooring: List<String>.from(json["flooring"].map((x) => x)),
|
|
walls: List<String>.from(json["walls"].map((x) => x)),
|
|
others: List<String>.from(json["others"].map((x) => x)),
|
|
);
|
|
|
|
factory StructureMaterialsII.fromJson2(Map<String, dynamic> json) =>
|
|
StructureMaterialsII(
|
|
id: json["id"],
|
|
bldgapprDetailsId: json["bldgapprDetailsId"],
|
|
foundation: List<String>.from(json["foundation"].map((x) => x)),
|
|
columns: List<String>.from(json["columns"].map((x) => x)),
|
|
beams: List<String>.from(json["beams"].map((x) => x)),
|
|
trussFraming: List<String>.from(json["trussFraming"].map((x) => x)),
|
|
roof: List<String>.from(json["roof"].map((x) => x)),
|
|
flooring: List<String>.from(json["flooring"].map((x) => x)),
|
|
walls: List<String>.from(json["walls"].map((x) => x)),
|
|
others: List<String>.from(json["others"].map((x) => x)),
|
|
);
|
|
|
|
StructureMaterialsII copy(
|
|
{int? id,
|
|
int? bldgapprDetailsId,
|
|
List<String>? foundation,
|
|
List<String>? columns,
|
|
List<String>? beams,
|
|
List<String>? trussFraming,
|
|
List<String>? roof,
|
|
List<String>? flooring,
|
|
List<String>? walls,
|
|
List<String>? 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<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"bldgapprDetailsId": bldgapprDetailsId,
|
|
"foundation": List<dynamic>.from(foundation!.map((x) => x)),
|
|
"columns": List<dynamic>.from(columns!.map((x) => x)),
|
|
"beams": List<dynamic>.from(beams!.map((x) => x)),
|
|
"truss_framing": List<dynamic>.from(trussFraming!.map((x) => x)),
|
|
"roof": List<dynamic>.from(roof!.map((x) => x)),
|
|
"flooring": List<dynamic>.from(flooring!.map((x) => x)),
|
|
"walls": List<dynamic>.from(walls!.map((x) => x)),
|
|
"others": List<dynamic>.from(others!.map((x) => x)),
|
|
};
|
|
}
|