class Doctor { // Add achievements field List achievements; // Add to existing fields String? speciality; String? yearsOfExperience; String? licenseNumber; String? profileDescription; String? digitalSignature; Address address; Profile profile; Doctor({ this.achievements = const [], // Initialize with empty list this.speciality, this.yearsOfExperience, this.licenseNumber, this.profileDescription, this.digitalSignature, required this.address, required this.profile, }); Map toJson() => { 'achievements': achievements, 'speciality': speciality, 'yearsOfExperience': yearsOfExperience, 'licenseNumber': licenseNumber, 'profileDescription': profileDescription, 'digitalSignature': digitalSignature, 'address': address.toJson(), 'profile': profile.toJson(), }; static Doctor fromJson(Map json) => Doctor( achievements: List.from(json['achievements'] ?? []), speciality: json['speciality'], yearsOfExperience: json['yearsOfExperience'], licenseNumber: json['licenseNumber'], profileDescription: json['profileDescription'], digitalSignature: json['digitalSignature'], address: Address.fromJson(json['address']), profile: Profile.fromJson(json['profile']), ); } class Profile { String? title; String? surName; String? middleName; String? lastName; List qualifications; String? profileDescription; Profile({ this.title, this.surName, this.middleName, this.lastName, required this.qualifications, }); Map toJson() => { 'title': title, 'surname': surName, 'lastName': lastName, 'middleName': middleName, 'qualifications': qualifications, }; static Profile fromJson(Map json) => Profile( title: json['title'], surName: json['surname'], middleName: json['middleName'], lastName: json['lastName'], qualifications: List.from(json['qualifications']), ); } class Address { String? floorBuilding; String? street; String? city; String? state; String? country; String? postalCode; Address({ this.floorBuilding, this.street, this.city, this.state, this.country, this.postalCode, }); Map toJson() => { 'floorBuilding': floorBuilding, 'street': street, 'city': city, 'state': state, 'country': country, 'postalCode': postalCode, }; static Address fromJson(Map json) => Address( floorBuilding: json['floorBuilding'], street: json['street'], city: json['city'], state: json['state'], country: json['country'], postalCode: json['postalCode'], ); }