class FaultDescription { FaultDescription({ this.id, this.defectName, this.workPerformed, this.estimatedTime, }); FaultDescription.fromJson(dynamic json) { id = json['id']; defectName = json['defectName']; workPerformed = json['workPerformed']; estimatedTime = json['estimatedTime']; } num id; String defectName; String workPerformed; String estimatedTime; FaultDescription copyWith({ num id, String defectName, String workPerformed, String estimatedTime, }) => FaultDescription( id: id ?? this.id, defectName: defectName ?? this.defectName, workPerformed: workPerformed ?? this.workPerformed, estimatedTime: estimatedTime ?? this.estimatedTime, ); Map toJson() { final map = {}; map['id'] = id; map['defectName'] = defectName; map['workPerformed'] = workPerformed; map['estimatedTime'] = estimatedTime; return map; } }