class SupervisorHierarchyLists { SupervisorHierarchyLists({ this.subordinateHierarchyList, this.supervisorHierarchyList, }); List? subordinateHierarchyList; List? supervisorHierarchyList; factory SupervisorHierarchyLists.fromJson(Map json) => SupervisorHierarchyLists( subordinateHierarchyList: json["SubordinateHierarchyList"] == null ? [] : List.from(json["SubordinateHierarchyList"]!.map((x) => HierarchyList.fromJson(x))), supervisorHierarchyList: json["SupervisorHierarchyList"] == null ? [] : List.from(json["SupervisorHierarchyList"]!.map((x) => HierarchyList.fromJson(x))), ); Map toJson() => { "SubordinateHierarchyList": subordinateHierarchyList == null ? [] : List.from(subordinateHierarchyList!.map((x) => x.toJson())), "SupervisorHierarchyList": supervisorHierarchyList == null ? [] : List.from(supervisorHierarchyList!.map((x) => x.toJson())), }; } class HierarchyList { HierarchyList({ this.employeeEmailAddress, this.employeeImage, this.employeeMobileNumber, this.employeeName, this.employeeNumber, this.employeeWorkNumber, this.lvl, this.numOfSubordinates, this.organizationName, this.positionName, }); String? employeeEmailAddress; dynamic employeeImage; String? employeeMobileNumber; String? employeeName; String? employeeNumber; String? employeeWorkNumber; int? lvl; int? numOfSubordinates; String? organizationName; String? positionName; factory HierarchyList.fromJson(Map json) => HierarchyList( employeeEmailAddress: json["EMPLOYEE_EMAIL_ADDRESS"], employeeImage: json["EMPLOYEE_IMAGE"], employeeMobileNumber: json["EMPLOYEE_MOBILE_NUMBER"], employeeName: json["EMPLOYEE_NAME"], employeeNumber: json["EMPLOYEE_NUMBER"], employeeWorkNumber: json["EMPLOYEE_WORK_NUMBER"], lvl: json["LVL"], numOfSubordinates: json["NUM_OF_SUBORDINATES"], organizationName: json["ORGANIZATION_NAME"], positionName: json["POSITION_NAME"], ); Map toJson() => { "EMPLOYEE_EMAIL_ADDRESS": employeeEmailAddress, "EMPLOYEE_IMAGE": employeeImage, "EMPLOYEE_MOBILE_NUMBER": employeeMobileNumber, "EMPLOYEE_NAME": employeeName, "EMPLOYEE_NUMBER": employeeNumber, "EMPLOYEE_WORK_NUMBER": employeeWorkNumber, "LVL": lvl, "NUM_OF_SUBORDINATES": numOfSubordinates, "ORGANIZATION_NAME": organizationName, "POSITION_NAME": positionName, }; }