department dropdown return first index item fixed.

design_3.0_medical_gas_inspection
Sikander Saleem 1 month ago
parent f0c003e6fa
commit 30bf847e6e

@ -1,18 +1,20 @@
import 'package:test_sa/models/base.dart';
class MedicalDepartmentModel extends Base {
MedicalDepartmentModel({
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
MedicalDepartmentModel(
{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
MedicalDepartmentModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
identifier = id?.toString() ?? '';
name = json['departmentName'] ?? json['name'];
departmentName = json['departmentName'] ?? json['name'];
departmentCode = json['departmentCode'];
ntCode = json['ntCode'];
costCenterNumber = json['costCenterNumber'];
costCenterName = json['costCenterName'];
name = json['name'];
id = json['id'];
createdBy = json['createdBy'];
createdDate = json['createdDate'];
modifiedBy = json['modifiedBy'];
@ -30,6 +32,4 @@ class MedicalDepartmentModel extends Base {
String? createdDate;
String? modifiedBy;
String? modifiedDate;
}

Loading…
Cancel
Save