diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index bc79800f..57d436f5 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -70,9 +70,45 @@ class _RegisterSearchPatientPageState extends State { dynamic ksaCountry = {"id": 967, "name": "Saudi Arabia"}; dynamic uaeCountry = {"id": 971, "name": "United Arab Emirates"}; + dynamic bahrainCountry = {"id": 973, "name": "Bahrain"}; + dynamic kuwaitCountry = {"id": 965, "name": "Kuwait"}; + dynamic afghanistanCountry = {"id": 93, "name": "Afghanistan"}; + dynamic algeriaCountry = {"id": 213, "name": "Algeria"}; + dynamic argentinaCountry = {"id": 54, "name": "Argentina"}; + dynamic bangladeshCountry = {"id": 880, "name": "Bangladesh"}; + dynamic colombiaCountry = {"id": 57, "name": "Colombia"}; + dynamic croatiaCountry = {"id": 385, "name": "Croatia"}; + dynamic denmarkCountry = {"id": 45, "name": "Denmark"}; + dynamic ecuadorCountry = {"id": 593, "name": "Ecuador"}; + dynamic egyptCountry = {"id": 20, "name": "Egypt"}; + dynamic ethiopiaCountry = {"id": 251, "name": "Ethiopia"}; + dynamic greeceCountry = {"id": 30, "name": "Greece"}; + dynamic icelandCountry = {"id": 354, "name": "Iceland"}; + dynamic indonesiaCountry = {"id": 62, "name": "Indonesia"}; + dynamic iraqCountry = {"id": 971, "name": "Iraq"}; + dynamic liberiaCountry = {"id": 231, "name": "Liberia"}; + dynamic senegalCountry = {"id": 221, "name": "Senegal"}; countryList.add(ksaCountry); countryList.add(uaeCountry); + countryList.add(bahrainCountry); + countryList.add(kuwaitCountry); + countryList.add(afghanistanCountry); + countryList.add(algeriaCountry); + countryList.add(argentinaCountry); + countryList.add(bangladeshCountry); + countryList.add(colombiaCountry); + countryList.add(croatiaCountry); + countryList.add(denmarkCountry); + countryList.add(ecuadorCountry); + countryList.add(egyptCountry); + countryList.add(ethiopiaCountry); + countryList.add(greeceCountry); + countryList.add(icelandCountry); + countryList.add(indonesiaCountry); + countryList.add(iraqCountry); + countryList.add(liberiaCountry); + countryList.add(senegalCountry); } @override @@ -221,9 +257,10 @@ class _RegisterSearchPatientPageState extends State { dropDownText: getBirthdate(), enabled: false, isTextFieldHasSuffix: true, - validationError: _birthDateInGregorian == null && isSubmitted - ? TranslationBase.of(context).emptyMessage - : null, + validationError: + _birthDateInGregorian == null && isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, suffixIcon: IconButton( icon: Icon( Icons.calendar_today, @@ -240,17 +277,18 @@ class _RegisterSearchPatientPageState extends State { setState(() { if (calenderType == CalenderType.Hijri) { birthDateInHijri = selectedDate; - _birthDateInGregorian = HijriCalendar().hijriToGregorian( - birthDateInHijri.hYear, - birthDateInHijri.hMonth, - birthDateInHijri.hDay); + _birthDateInGregorian = HijriCalendar() + .hijriToGregorian( + birthDateInHijri.hYear, + birthDateInHijri.hMonth, + birthDateInHijri.hDay); print(_birthDateInGregorian); print(birthDateInHijri); } else { _birthDateInGregorian = selectedDate; birthDateInHijri = HijriCalendar() - .gregorianToHijri( - selectedDate.year, selectedDate.month, selectedDate.day); + .gregorianToHijri(selectedDate.year, + selectedDate.month, selectedDate.day); print(_birthDateInGregorian); print(birthDateInHijri); @@ -259,7 +297,6 @@ class _RegisterSearchPatientPageState extends State { }); }, ), - SizedBox( height: 70, ), @@ -436,16 +473,12 @@ class _RegisterSearchPatientPageState extends State { } getBirthdate() { - if (calenderType == CalenderType.Hijri) { - return birthDateInHijri != null - ? "$birthDateInHijri" - : null; - }else{ + return birthDateInHijri != null ? "$birthDateInHijri" : null; + } else { return _birthDateInGregorian != null ? "${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}" : null; } - } } diff --git a/pubspec.lock b/pubspec.lock index 3e9968d3..4fcb6792 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -706,7 +706,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.4" mime: dependency: transitive description: @@ -1040,7 +1040,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.2" sticky_headers: dependency: "direct main" description: @@ -1245,5 +1245,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.2 <2.11.0" + dart: ">=2.10.2 <=2.11.0-213.1.beta" flutter: ">=1.22.2 <2.0.0"