diff --git a/lib/models/new_models/traf_department.dart b/lib/models/new_models/traf_department.dart index 3ac9841c..5a2e256d 100644 --- a/lib/models/new_models/traf_department.dart +++ b/lib/models/new_models/traf_department.dart @@ -3,9 +3,9 @@ import 'package:test_sa/models/new_models/room_model.dart'; import '../base.dart'; class TrafDepartment extends Base { - TrafDepartment( - {this.departmentName, this.departmentCode, this.ntCode, this.costCenterNumber, this.costCenterName, this.name, this.id, this.createdBy, this.createdDate, this.modifiedBy, this.modifiedDate}) - : super(identifier: id?.toString() ?? '', name: departmentName); // Handle potential null id + TrafDepartment({ + this.departmentName, this.departmentCode, this.ntCode, this.costCenterNumber, this.costCenterName, this.name, this.id, this.createdBy, this.createdDate, this.modifiedBy, this.modifiedDate + }) : super(identifier: id?.toString() ?? '', name: departmentName); // Handle potential null id TrafDepartment.fromJson(Map json) { departmentName = json['departmentName'] ?? json['name']; @@ -15,7 +15,6 @@ class TrafDepartment extends Base { costCenterName = json['costCenterName']; name = json['name']; id = json['id']; - identifier = id?.toString() ?? ''; createdBy = json['createdBy']; createdDate = json['createdDate']; modifiedBy = json['modifiedBy'];