84 lines
2.2 KiB
Dart
84 lines
2.2 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final floorSketch = floorSketchFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
ValidIds floorSketchFromJson(String str) => ValidIds.fromJson(json.decode(str));
|
|
|
|
String floorSketchToJson(ValidIds data) => json.encode(data.toJson());
|
|
|
|
class ValidIds {
|
|
int? bldgapprDetailsId;
|
|
String? dateCreated;
|
|
String? validIds;
|
|
String? genCode;
|
|
|
|
ValidIds({
|
|
this.bldgapprDetailsId,
|
|
this.dateCreated,
|
|
this.validIds,
|
|
this.genCode,
|
|
});
|
|
|
|
ValidIds copy(
|
|
{int? bldgapprDetailsId,
|
|
String? dateCreated,
|
|
String? validIds,
|
|
String? genCode}) {
|
|
return ValidIds(
|
|
bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId,
|
|
dateCreated: dateCreated ?? this.dateCreated,
|
|
validIds: validIds ?? this.validIds,
|
|
genCode: genCode ?? this.genCode,
|
|
);
|
|
}
|
|
|
|
ValidIds copyWith({
|
|
int? bldgapprDetailsId,
|
|
String? dateCreated,
|
|
String? validIds,
|
|
String? genCode,
|
|
}) =>
|
|
ValidIds(
|
|
bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId,
|
|
dateCreated: dateCreated ?? this.dateCreated,
|
|
validIds: validIds ?? this.validIds,
|
|
genCode: genCode ?? this.genCode,
|
|
);
|
|
|
|
factory ValidIds.fromJson(Map<String, dynamic> json) => ValidIds(
|
|
bldgapprDetailsId: json["bldgappr_details_id"],
|
|
dateCreated: json["date_created"],
|
|
validIds: json["id_attachment"],
|
|
genCode: json["gen_code"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"bldgappr_details_id": bldgapprDetailsId,
|
|
"date_created": dateCreated,
|
|
"valid_ids": validIds,
|
|
"gen_code": genCode,
|
|
};
|
|
|
|
// Define the fromMap method to convert a Map into a ValidIds object
|
|
factory ValidIds.fromMap(Map<String, dynamic> map) {
|
|
return ValidIds(
|
|
bldgapprDetailsId: map['bldgapprDetailsId'] as int?,
|
|
validIds: map['validIds'] as String?,
|
|
dateCreated: map['dateCreated'] as String?,
|
|
genCode: map['genCode'] as String?,
|
|
);
|
|
}
|
|
|
|
// You can also add a toMap method if needed for converting back to Map
|
|
Map<String, dynamic> toMap() {
|
|
return {
|
|
'bldgapprDetailsId': bldgapprDetailsId,
|
|
'validIds': validIds,
|
|
'dateCreated': dateCreated,
|
|
'genCode': genCode,
|
|
};
|
|
}
|
|
}
|