diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index ea14b71f..257a3995 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -343,7 +343,10 @@ const Map> localizedValues = { "en": "Online Payment Service", 'ar': 'خدمة الدفع عبر الإلكتدوني' }, - "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, + "OffersAndPackages": { + "en": "Online transfer request", + 'ar': 'طلب التحويل الالكتروني' + }, "ComprehensiveMedicalCheckup": { "en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل' @@ -363,17 +366,26 @@ const Map> localizedValues = { "consultation": {"en": "Consultation", "ar": "استشارة"}, "logs": {"en": "Logs", "ar": "السجلات"}, "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}, - "locationDialogMessage": {"en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."} - "parking":{"en":"Parking","ar":"مواقف"}, - "alhabiServices":{"en":"HMG Service","ar":"خدمات الحبيب"}, - "parkingTitle":{"en":"Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.","ar":" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "}, - "readBarcode":{"en":"Read Barcode","ar":"قراءة الكود"}, - "showMyPark":{"en":"Show My Park","ar":"عرض بارك"}, - "clearMyData":{"en":"clear My Data","ar":"امسح البيانات"}, - "floor":{"en":"Floor:","ar":"الطابق"}, - "gate":{"en":"Gate:","ar":"بوابة"}, - "building":{"en":"Building:","ar":"المبنى"}, - "branch":{"en":"Branch:","ar":"الفرع"}, - "emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"}, - "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"} + "locationDialogMessage": { + "en": + "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", + "ar": + "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." + }, + "parking": {"en": "Parking", "ar": "مواقف"}, + "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, + "parkingTitle": { + "en": + "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.", + "ar": + " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). " + }, + "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, + "showMyPark": {"en": "Show My Park", "ar": "عرض بارك"}, + "clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"}, + "floor": {"en": "Floor:", "ar": "الطابق"}, + "gate": {"en": "Gate:", "ar": "بوابة"}, + "building": {"en": "Building:", "ar": "المبنى"}, + "branch": {"en": "Branch:", "ar": "الفرع"}, + "emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"}, }; diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 4f16ab77..b8969a3a 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -66,8 +66,8 @@ class DoctorsListService extends BaseService { // "License": true, // "IsVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, // "DoctorIDsList": doctorId - "Latitude": lat.toString(), - "Longitude": long.toString(), + "Latitude": lat != null ? lat.toString() : 0, + "Longitude": long != null ? long.toString() : 0, "License": true }; diff --git a/lib/widgets/others/bottom_bar.dart b/lib/widgets/others/bottom_bar.dart index bce06dab..49651ca1 100644 --- a/lib/widgets/others/bottom_bar.dart +++ b/lib/widgets/others/bottom_bar.dart @@ -322,6 +322,7 @@ class _SearchBot extends State { getDoctorsList(projectId, clinicId, context, {doctorId, doctorName}) { List doctorsList = []; List arr = []; + List arrDistance = []; DoctorsListService service = new DoctorsListService(); service .getDoctorsList(clinicId, projectId, context, doctorId: doctorName) @@ -334,6 +335,9 @@ class _SearchBot extends State { res['DoctorList'].forEach((v) { doctorsList.add(new DoctorList.fromJson(v)); arr.add(new DoctorList.fromJson(v).projectName); + arrDistance.add(new DoctorList.fromJson(v) + .projectDistanceInKiloMeters + .toString()); }); if (res['DoctorList'].length == 1) { getDoctorProfile( @@ -341,7 +345,7 @@ class _SearchBot extends State { //speak(); } else { - navigateToSearchResults(context, doctorsList, arr); + navigateToSearchResults(context, doctorsList, arr, arrDistance); } } }); @@ -366,7 +370,7 @@ class _SearchBot extends State { ))); } - Future navigateToSearchResults(context, docList, arr) async { + Future navigateToSearchResults(context, docList, arr, arrDistance) async { // Navigator.push( // context, // MaterialPageRoute( @@ -376,8 +380,11 @@ class _SearchBot extends State { Navigator.push( context, MaterialPageRoute( - builder: (context) => - BranchView(doctorsList: docList, result: result, num: numAll), + builder: (context) => BranchView( + doctorsList: docList, + result: result, + num: numAll, + resultDistance: arrDistance), ), ); }