diff --git a/assets/images/new/services/allergies_diagnosed.svg b/assets/images/new/services/allergies_diagnosed.svg new file mode 100644 index 00000000..258658c8 --- /dev/null +++ b/assets/images/new/services/allergies_diagnosed.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/services/ask_doctor.svg b/assets/images/new/services/ask_doctor.svg new file mode 100644 index 00000000..90b7f300 --- /dev/null +++ b/assets/images/new/services/ask_doctor.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/new/services/balance_credit.svg b/assets/images/new/services/balance_credit.svg new file mode 100644 index 00000000..268f284f --- /dev/null +++ b/assets/images/new/services/balance_credit.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/images/new/services/chatbot.svg b/assets/images/new/services/chatbot.svg new file mode 100644 index 00000000..cf2a5092 --- /dev/null +++ b/assets/images/new/services/chatbot.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/new/services/eye_measurement.svg b/assets/images/new/services/eye_measurement.svg new file mode 100644 index 00000000..563329c5 --- /dev/null +++ b/assets/images/new/services/eye_measurement.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/images/new/services/insurance_approval.svg b/assets/images/new/services/insurance_approval.svg new file mode 100644 index 00000000..f6a5885f --- /dev/null +++ b/assets/images/new/services/insurance_approval.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/new/services/insurance_card.svg b/assets/images/new/services/insurance_card.svg new file mode 100644 index 00000000..81d91b5e --- /dev/null +++ b/assets/images/new/services/insurance_card.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/new/services/internet_connection.svg b/assets/images/new/services/internet_connection.svg new file mode 100644 index 00000000..09176400 --- /dev/null +++ b/assets/images/new/services/internet_connection.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/services/invoice_list.svg b/assets/images/new/services/invoice_list.svg new file mode 100644 index 00000000..18fe134f --- /dev/null +++ b/assets/images/new/services/invoice_list.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/new/services/medical_report.svg b/assets/images/new/services/medical_report.svg new file mode 100644 index 00000000..186af7a6 --- /dev/null +++ b/assets/images/new/services/medical_report.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/new/services/monthly_report.svg b/assets/images/new/services/monthly_report.svg new file mode 100644 index 00000000..d218855a --- /dev/null +++ b/assets/images/new/services/monthly_report.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/new/services/sick_leave.svg b/assets/images/new/services/sick_leave.svg new file mode 100644 index 00000000..4d8eea5d --- /dev/null +++ b/assets/images/new/services/sick_leave.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/services/smart_watch.svg b/assets/images/new/services/smart_watch.svg new file mode 100644 index 00000000..236f64b4 --- /dev/null +++ b/assets/images/new/services/smart_watch.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assets/images/new/services/tracker.svg b/assets/images/new/services/tracker.svg new file mode 100644 index 00000000..7d727cee --- /dev/null +++ b/assets/images/new/services/tracker.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/new/services/vaccine_list.svg b/assets/images/new/services/vaccine_list.svg new file mode 100644 index 00000000..7096feb3 --- /dev/null +++ b/assets/images/new/services/vaccine_list.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 1e3ead26..ff90a645 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -292,18 +292,9 @@ const Map localizedValues = { "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "requestA": {"en": "Request:", "ar": "اسعاف"}, "MyAppointments": {"en": "My", "ar": "مواعيدي"}, - "NoBookedAppointments": { - "en": "No Booked Appointments", - "ar": "لا توجد مواعيد محجوزة" - }, - "NoConfirmedAppointments": { - "en": "No Confirmed Appointments", - "ar": "لا توجد مواعيد مؤكدة" - }, - "noArrivedAppointments": { - "en": "No Arrived Appointments", - "ar": "لم تصل المواعيد" - }, + "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, + "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, + "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"}, "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعدي"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, @@ -483,6 +474,23 @@ const Map localizedValues = { "writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"}, "shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"}, "review": {"en": " reviews", "ar": " تقييمات"}, + "viewMedicalFile": {"en": "View Medical File", "ar": "عرض الملف الطبي"}, + "viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"}, + "medicalFile": {"en": "Medical File", "ar": "ملف طبي"}, + "verified": {"en": "Verified", "ar": "تم التحقق"}, + "checkup": {"en": "Checkup", "ar": "فحص"}, + "hhcHome": {"en": "HHC Home", "ar": "الصفحة الرئيسية HHC"}, + "refferal": {"en": "E-Refferal", "ar": "الإحالة الإلكترونية"}, + "healthCare": {"en": "Health Care", "ar": "الرعاية الصحية"}, + "emergency": {"en": "Emergency", "ar": "طارئ"}, + "cantSeeProfile": {"en": "Can’t see your medical File?", "ar": "لا تستطيع رؤية ملفك الطبي؟"}, + "loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"}, + "HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"}, + "ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"}, + "services2": {"en": "Services", "ar": "خدمات"}, + + "comprehensive": {"en": "Comprehensive", "ar": "شامل"}, + "onlineConsulting": {"en": "Online Consulting", "ar": "استشارات عبر الإنترنت"}, "pendingOrder": {"en": " PENDING", "ar": " معلقة"}, "deliveredOrder": {"en": " DELIVERED", "ar": " تم التوصيل"}, "processingOrder": {"en": " PROCESSING", "ar": "قيد التنفيذ"}, @@ -1033,7 +1041,7 @@ const Map localizedValues = { "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, - "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"}, + "covidTest": {"en": "COVID TEST", "ar": "فحص كورونا"}, "driveThru": {"en": "Drive-Thru", "ar": "من السيارة"}, "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"}, diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 21f277d9..7a9cd016 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -52,15 +52,12 @@ class _AllHabibMedicalServiceState extends State { LocationUtils locationUtils; var weather = '--'; WeatherService _weatherService = WeatherService(); + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance.addPostFrameCallback((_) => { - Geolocator.getLastKnownPosition() - .then((value) => setLocation(value)) - }); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))}); }); super.initState(); } @@ -99,14 +96,12 @@ class _AllHabibMedicalServiceState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context) - .healthWeatherIndicators, + TranslationBase.of(context).healthWeatherIndicators, color: Colors.white, fontWeight: FontWeight.w600, ), Texts( - TranslationBase.of(context) - .healthTipsBasedOnCurrentWeather, + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, color: Colors.white, fontSize: 14, ), @@ -134,11 +129,7 @@ class _AllHabibMedicalServiceState extends State { width: 60, height: 60, ), - Directionality( - textDirection: TextDirection.ltr, - child: AppText(weather, - fontSize: 22, - color: Colors.white)) + Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white)) ], ), Texts( @@ -158,8 +149,7 @@ class _AllHabibMedicalServiceState extends State { Navigator.pop(context); widget.goToMyProfile(); }, - imageLocation: - 'assets/images/new-design/my_file_bottom_bar.png', + imageLocation: 'assets/images/new-design/my_file_bottom_bar.png', title: TranslationBase.of(context).myMedicalFile, ), ServicesContainer( @@ -181,8 +171,7 @@ class _AllHabibMedicalServiceState extends State { ), ), ), - imageLocation: - 'assets/images/new-design/booking_icon_active.png', + imageLocation: 'assets/images/new-design/booking_icon_active.png', title: TranslationBase.of(context).bookAppo, ), ServicesContainer( @@ -192,8 +181,7 @@ class _AllHabibMedicalServiceState extends State { page: PaymentService(), ), ), - imageLocation: - 'assets/images/al-habib_online_payment_service_icon.png', + imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).onlinePaymentService, ), ServicesContainer( @@ -203,8 +191,7 @@ class _AllHabibMedicalServiceState extends State { page: AnicllaryOrders(), ), ), - imageLocation: - 'assets/images/comprehensive_medical_checkup_logo.png', + imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png', title: TranslationBase.of(context).anicllaryOrders, ), ServicesContainer( @@ -212,8 +199,7 @@ class _AllHabibMedicalServiceState extends State { context, FadePage(), ), - imageLocation: - 'assets/images/al-habib_online_payment_service_icon.png', + imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).covid19_driveThrueTest, ), ServicesContainer( @@ -246,15 +232,13 @@ class _AllHabibMedicalServiceState extends State { page: InsuranceUpdate(), ), ), - imageLocation: - 'assets/images/medical/insurance_card_icon.png', + imageLocation: 'assets/images/medical/insurance_card_icon.png', title: TranslationBase.of(context).updateInsurance, ), ServicesContainer( onTap: () => Navigator.push( context, - FadePage( - page: EReferralPage()), + FadePage(page: EReferralPage()), ), imageLocation: 'assets/images/ereferral_service_icon.png', title: TranslationBase.of(context).ereferral, @@ -266,8 +250,7 @@ class _AllHabibMedicalServiceState extends State { page: MyFamily(), ), ), - imageLocation: - 'assets/images/new-design/family_menu_icon_red.png', + imageLocation: 'assets/images/new-design/family_menu_icon_red.png', title: TranslationBase.of(context).myFamily, ), if (projectViewModel.havePrivilege(35)) @@ -276,8 +259,7 @@ class _AllHabibMedicalServiceState extends State { context, FadePage(page: ChildVaccinesPage()), ), - imageLocation: - 'assets/images/new-design/children_vaccines_icon.png', + imageLocation: 'assets/images/new-design/children_vaccines_icon.png', title: TranslationBase.of(context).childVaccine, ), ServicesContainer( @@ -287,8 +269,7 @@ class _AllHabibMedicalServiceState extends State { page: ToDo(isShowAppBar: true), ), ), - imageLocation: - 'assets/images/new-design/upcoming_icon_bottom_bar.png', + imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png', title: TranslationBase.of(context).todoList, ), if (projectViewModel.havePrivilege(42)) @@ -315,8 +296,7 @@ class _AllHabibMedicalServiceState extends State { page: (HealthCalculators()), ), ), - imageLocation: - 'assets/images/new-design/health_calculator_icon.png', + imageLocation: 'assets/images/new-design/health_calculator_icon.png', title: TranslationBase.of(context).calculators, ), ServicesContainer( @@ -326,14 +306,12 @@ class _AllHabibMedicalServiceState extends State { page: HealthConverter(), ), ), - imageLocation: - 'assets/images/new-design/health_convertor_icon.png', + imageLocation: 'assets/images/new-design/health_convertor_icon.png', title: TranslationBase.of(context).converters, ), if (projectViewModel.havePrivilege(38)) ServicesContainer( - onTap: () => - Navigator.push(context, FadePage(page: H2OPage())), + onTap: () => Navigator.push(context, FadePage(page: H2OPage())), // Navigator.push( // context, // FadePage( @@ -349,8 +327,7 @@ class _AllHabibMedicalServiceState extends State { context, FadePage(), ), - imageLocation: - 'assets/images/new-design/smartwatch_icon.png', + imageLocation: 'assets/images/new-design/smartwatch_icon.png', title: TranslationBase.of(context).smartWatches, ), ServicesContainer( @@ -360,15 +337,12 @@ class _AllHabibMedicalServiceState extends State { page: ParkingPage(), ), ), - imageLocation: - 'assets/images/new-design/parking_system_icon.png', + imageLocation: 'assets/images/new-design/parking_system_icon.png', title: TranslationBase.of(context).parking, ), ServicesContainer( - onTap: () => launch( - "https://hmgwebservices.com/vt_mobile/html/index.html"), - imageLocation: - 'assets/images/new-design/virtual_tour_icon.png', + onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"), + imageLocation: 'assets/images/new-design/virtual_tour_icon.png', title: TranslationBase.of(context).vTour, ), ServicesContainer( @@ -376,12 +350,10 @@ class _AllHabibMedicalServiceState extends State { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => MyWebView( title: "HMG News", - selectedUrl: - "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", ))); }, - imageLocation: - 'assets/images/new-design/twitter_dashboard_icon.png', + imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png', title: TranslationBase.of(context).latestNews, ), ServicesContainer( @@ -404,8 +376,7 @@ class _AllHabibMedicalServiceState extends State { getAuthUser() async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson( - await this.sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); setState(() { authUser = data; }); @@ -419,8 +390,7 @@ class _AllHabibMedicalServiceState extends State { }); } else { setState(() { - weather = - data != null ? data['Temperature'].toString() + '\u2103' : '--'; + weather = data != null ? data['Temperature'].toString() + '\u2103' : '--'; }); } } diff --git a/lib/pages/landing/fragments/home_page_fragment.dart b/lib/pages/landing/fragments/home_page_fragment.dart index 670bf5e1..84be4256 100644 --- a/lib/pages/landing/fragments/home_page_fragment.dart +++ b/lib/pages/landing/fragments/home_page_fragment.dart @@ -1,12 +1,19 @@ import 'package:diplomaticquarterapp/models/hmg_services.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; class HomePageFragment extends StatefulWidget { + Function onPharmacyClick, onLoginClick; + + HomePageFragment({this.onPharmacyClick, this.onLoginClick}); + @override _HomePageFragmentState createState() => _HomePageFragmentState(); } @@ -18,21 +25,23 @@ class _HomePageFragmentState extends State { void initState() { // TODO: implement initState super.initState(); - initialiseHmgServices(false); + // getFamilyFiles(); } initialiseHmgServices(bool isLogin) { - hmgServices.add(new HmgServices(0, "LiveCare ", "Online Consulting", "assets/images/new/Live_Care.svg", isLogin)); - hmgServices.add(new HmgServices(1, "Covid Test", "Drive-Thru", "assets/images/new/covid_test_drive_thru.svg", isLogin)); - hmgServices.add(new HmgServices(2, "Checkup", "Comprehensive", "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(3, "HHC Home", "Health Care", "assets/images/new/HHC.svg", isLogin)); - hmgServices.add(new HmgServices(4, "E-Refferal", "Services", "assets/images/new/E_Refferal.svg", isLogin)); - hmgServices.add(new HmgServices(5, "RRT", "Emergency", "assets/images/new/RRT.svg", isLogin)); + hmgServices.clear(); + hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin)); + hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin)); } @override Widget build(BuildContext context) { + initialiseHmgServices(false); return Container( width: double.infinity, child: Column( @@ -41,7 +50,11 @@ class _HomePageFragmentState extends State { aspectRatio: 2, child: Container( margin: EdgeInsets.all(14), - child: SliderView(), + child: SliderView( + onLoginClick: () { + widget.onLoginClick(); + }, + ), // height: MediaQuery.of(context).size.width / 2.6, ), ), @@ -50,19 +63,18 @@ class _HomePageFragmentState extends State { child: Image.asset("assets/images/bn_offer.png"), ), mHeight(20), - Padding( - padding: const EdgeInsets.only( - left: 20, - right: 20, - top: 20, - ), - child: Column( - children: [ - Row( + Column( + children: [ + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 8, + ), + child: Row( children: [ Expanded( child: Text( - "HMG Services", + TranslationBase.of(context).hMGService, style: TextStyle( color: Colors.black, fontSize: 18, @@ -70,27 +82,39 @@ class _HomePageFragmentState extends State { ), ), ), - Text( - "View All Services", - style: TextStyle( - color: CustomColors.accentColor, - fontSize: 14, + FlatButton( + onPressed: () { + Navigator.push(context, FadePage(page: AllHabibMedicalService())); + }, + child: Text( + TranslationBase.of(context).viewAllServices, + style: TextStyle( + color: CustomColors.accentColor, + fontSize: 14, + decoration: TextDecoration.underline, + ), ), ), ], ), - mHeight(20), - GridView.builder( + ), + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 4, + ), + child: GridView.builder( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: hmgServices.length, padding: EdgeInsets.zero, itemBuilder: (BuildContext context, int index) { - return ServicesView(hmgServices[index],index); + return ServicesView(hmgServices[index], index); }), - ], - ), + ), + ], ), Padding( padding: const EdgeInsets.only( @@ -98,7 +122,11 @@ class _HomePageFragmentState extends State { right: 20, top: 20, ), - child: PharmacyView(), + child: PharmacyView( + onPharmacyClick: () { + widget.onPharmacyClick(); + }, + ), ), mHeight(140), ], diff --git a/lib/pages/landing/fragments/logged_home_page_fragment.dart b/lib/pages/landing/fragments/logged_home_page_fragment.dart index 0b22ec67..05822158 100644 --- a/lib/pages/landing/fragments/logged_home_page_fragment.dart +++ b/lib/pages/landing/fragments/logged_home_page_fragment.dart @@ -1,28 +1,39 @@ +import 'package:auto_size_text/auto_size_text.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/gradient_color.dart'; import 'package:diplomaticquarterapp/models/hmg_services.dart'; import 'package:diplomaticquarterapp/models/slider_data.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as s; import 'package:provider/provider.dart'; class LoggedHomePageFragment extends StatefulWidget { ProjectViewModel projectViewModel; + Function onPharmacyClick; - LoggedHomePageFragment(this.projectViewModel); + LoggedHomePageFragment(this.projectViewModel, {this.onPharmacyClick}); @override _HomePageFragmentState createState() => _HomePageFragmentState(); @@ -31,22 +42,26 @@ class LoggedHomePageFragment extends StatefulWidget { class _HomePageFragmentState extends State { List hmgServices = []; var familyFileProvider = FamilyFilesProvider(); + List appoList = []; @override void initState() { // TODO: implement initState super.initState(); - initialiseHmgServices(false); + + getPatientAppointmentHistory1(); + // getPatientAppointmentHistory1(); // getFamilyFiles(); } initialiseHmgServices(bool isLogin) { - hmgServices.add(new HmgServices(0, "LiveCare ", "Online Consulting", "assets/images/new/Live_Care.svg", isLogin)); - hmgServices.add(new HmgServices(1, "Covid Test", "Drive-Thru", "assets/images/new/covid_test_drive_thru.svg", isLogin)); - hmgServices.add(new HmgServices(2, "Checkup", "Comprehensive", "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(3, "HHC Home", "Health Care", "assets/images/new/HHC.svg", isLogin)); - hmgServices.add(new HmgServices(4, "E-Refferal", "Services", "assets/images/new/E_Refferal.svg", isLogin)); - hmgServices.add(new HmgServices(5, "RRT", "Emergency", "assets/images/new/RRT.svg", isLogin)); + hmgServices.clear(); + hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin)); + hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin)); } Future getFamilyFiles() async { @@ -64,6 +79,7 @@ class _HomePageFragmentState extends State { @override Widget build(BuildContext context) { + initialiseHmgServices(false); var appoCountProvider = Provider.of(context); List myMedicalList = Utils.myMedicalListHomePage(projectViewModel: widget.projectViewModel, context: context, count: appoCountProvider.count, isLogin: widget.projectViewModel.isLogin); return Container( @@ -106,7 +122,7 @@ class _HomePageFragmentState extends State { for (int i = 0; i < sliderData.length; i++) Builder( builder: (BuildContext context) { - return LoggedSliderView(sliderData[i]); + return LoggedSliderView(widget.projectViewModel, sliderData[i]); }, ) ], @@ -125,10 +141,15 @@ class _HomePageFragmentState extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), itemBuilder: (context, index) { - return Container( - child: myMedicalList[index], - margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0), - ); + return widget.projectViewModel.isArabic + ? Container( + child: myMedicalList[index], + margin: EdgeInsets.only(left: index == 3 ? 20 : 0, right: index == 0 ? 20 : 0), + ) + : Container( + child: myMedicalList[index], + margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0), + ); }, separatorBuilder: (BuildContext context, int index) { return mWidth(12); @@ -136,44 +157,63 @@ class _HomePageFragmentState extends State { ), ), Padding( - padding: const EdgeInsets.only( - left: 20, - right: 20, - top: 16, - ), + padding: widget.projectViewModel.isArabic + ? EdgeInsets.only( + right: 20, + left: 8, + top: 4, + ) + : EdgeInsets.only( + left: 20, + right: 8, + top: 4, + ), child: Row( children: [ mFlex(1), - Text( - "View Medical File", - style: TextStyle( - color: CustomColors.accentColor, - fontSize: 14, - decoration: TextDecoration.underline, + FlatButton( + onPressed: () { + navigateTo(context, MedicalProfilePage()); + }, + child: Text( + TranslationBase.of(context).viewMedicalFile, + style: TextStyle( + color: CustomColors.accentColor, + fontSize: 14, + decoration: TextDecoration.underline, + ), ), ), ], ), ), - mHeight(16), - Padding( - padding: const EdgeInsets.only(left: 20, right: 20), - child: Image.asset("assets/images/bn_offer.png"), - ), + mHeight(4), + appoCountProvider.count == 0 + ? Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Image.asset("assets/images/bn_offer.png"), + ) + : offersView(appoCountProvider.count), mHeight(14), Column( children: [ Padding( - padding: const EdgeInsets.only( - left: 20, - right: 20, - top: 20, - ), + padding: widget.projectViewModel.isArabic + ? EdgeInsets.only( + right: 20, + left: 8, + top: 4, + ) + : EdgeInsets.only( + left: 20, + right: 8, + top: 4, + ), child: Row( children: [ Expanded( child: Text( - "HMG Services", + TranslationBase.of(context).hMGService, style: TextStyle( color: Colors.black, fontSize: 18, @@ -181,18 +221,23 @@ class _HomePageFragmentState extends State { ), ), ), - Text( - "View All Services", - style: TextStyle( - color: CustomColors.accentColor, - decoration: TextDecoration.underline, - fontSize: 14, + FlatButton( + onPressed: () { + Navigator.push(context, FadePage(page: AllHabibMedicalService())); + }, + child: Text( + TranslationBase.of(context).viewAllServices, + style: TextStyle( + color: CustomColors.accentColor, + fontSize: 14, + decoration: TextDecoration.underline, + ), ), ), ], ), ), - mHeight(20), + mHeight(4), Container( width: double.infinity, height: MediaQuery.of(context).size.height * 0.143, @@ -204,7 +249,9 @@ class _HomePageFragmentState extends State { itemBuilder: (BuildContext context, int index) { return Container( width: MediaQuery.of(context).size.height * 0.143, - margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == hmgServices.length - 1 ? 20 : 0), + margin: widget.projectViewModel.isArabic + ? EdgeInsets.only(left: index == hmgServices.length - 1 ? 20 : 0, right: index == 0 ? 20 : 0) + : EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == hmgServices.length - 1 ? 20 : 0), child: ServicesView(hmgServices[index], index), ); }, @@ -221,11 +268,189 @@ class _HomePageFragmentState extends State { right: 20, top: 20, ), - child: PharmacyView(), + child: PharmacyView( + onPharmacyClick: () { + widget.onPharmacyClick(); + }, + ), ), mHeight(140), ], ), ); } + + Widget offersView(int counts) { + if (appoList.length > 0) { + return Container( + height: MediaQuery.of(context).size.width / 4.35, + child: ListView.separated( + itemCount: 2, + padding: EdgeInsets.zero, + scrollDirection: Axis.horizontal, + physics: BouncingScrollPhysics(), + itemBuilder: (context, index) { + return index == 0 + ? Container( + width: MediaQuery.of(context).size.width / 1.123, + height: MediaQuery.of(context).size.width / 4.35, + margin: widget.projectViewModel.isArabic ? EdgeInsets.only(right: index == 0 ? 20 : 0) : EdgeInsets.only(left: index == 0 ? 20 : 0), + padding: EdgeInsets.all(8), + decoration: containerColorRadiusBorderWidth(Colors.white, 16, Colors.black, 2), + child: InkWell( + onTap: () {}, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + circularAviator(MediaQuery.of(context).size.width / 10, brColor: Colors.white, elevation: 1), + mWidth(8), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + appoList[index].doctorTitle + " " + appoList[index].doctorNameObj, + style: TextStyle( + color: Colors.black, + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon( + Icons.watch_later_rounded, + size: 16, + ), + mWidth(4), + Expanded( + child: AutoSizeText( + DateUtil.getWeekDayMonthDayYearDateFormatted( + DateUtil.convertStringToDate(appoList[index].appointmentDate), widget.projectViewModel.isArabic ? "ar" : "en") + + " " + + appoList[index].startTime.substring(0, 5), + maxLines: 1, + ), + ), + ], + ), + ], + ), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon( + Icons.notifications_active_sharp, + color: Color(0xFF9D9D9D), + size: 16, + ), + mWidth(4), + Text( + "Remind me", + style: TextStyle( + color: Color(0xFF9D9D9D), + fontSize: 12, + ), + ), + ], + ), + ], + ), + mFlex(1), + Flexible( + child: Container( + width: double.infinity, + child: Row( + children: [ + // Text( + // "Appointment Details", + // style: TextStyle( + // color: CustomColors.accentColor, + // decoration: TextDecoration.underline, + // ), + // ), + FlatButton( + onPressed: () { + Navigator.push(context, FadePage(page: MyAppointments())); + }, + child: Text( + "Appointment Details", + style: TextStyle( + color: CustomColors.accentColor, + fontSize: 14, + decoration: TextDecoration.underline, + ), + ), + ), + mFlex(1), + Icon(Icons.arrow_forward), + ], + ), + ), + ), + ], + ), + ), + ], + ), + ), + ) + : Padding( + padding: widget.projectViewModel.isArabic ? EdgeInsets.only(left: index == 1 ? 20 : 0) : EdgeInsets.only(right: index == 1 ? 20 : 0), + child: Container( + child: showOfferImage(), + width: MediaQuery.of(context).size.width / 1.123, + ), + ); + }, + separatorBuilder: (BuildContext context, int index) { + return mWidth(12); + }, + ), + ); + } else { + return Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Image.asset("assets/images/bn_offer.png"), + ); + } + } + + Widget showOfferImage() { + return Image.asset( + "assets/images/bn_offer.png", + width: double.infinity, + height: double.infinity, + fit: BoxFit.fill, + ); + } + + getPatientAppointmentHistory1() async { + DoctorsListService service = new DoctorsListService(); + + Map res = await service.getPatientAppointmentHistory(true, context); + // appoList.clear(); + if (res['MessageStatus'] == 1) { + if (res['AppoimentAllHistoryResultList'].length != 0) { + appoList.clear(); + res['AppoimentAllHistoryResultList'].forEach((v) { + appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); + }); + } + } + setState(() {}); + } } diff --git a/lib/pages/landing/home_page_2.dart b/lib/pages/landing/home_page_2.dart index e18a7fcb..1f37adca 100644 --- a/lib/pages/landing/home_page_2.dart +++ b/lib/pages/landing/home_page_2.dart @@ -1,54 +1,32 @@ -import 'package:carousel_slider/carousel_slider.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; -import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; -import 'package:diplomaticquarterapp/models/gradient_color.dart'; -import 'package:diplomaticquarterapp/models/hmg_services.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; -import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; + import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; -import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; + import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/fragments/home_page_fragment.dart'; import 'package:diplomaticquarterapp/pages/landing/fragments/logged_home_page_fragment.dart'; -import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart'; -import 'package:diplomaticquarterapp/pages/landing/widgets/offer_view.dart'; -import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart'; -import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; -import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; -import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart'; -import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as s; -import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; + import 'package:diplomaticquarterapp/theme/colors.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; + import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; + import 'landing_page_pharmcy.dart'; -import 'package:diplomaticquarterapp/models/slider_data.dart'; class HomePage2 extends StatefulWidget { final Function goToMyProfile; + Function onLoginClick; - HomePage2({Key key, this.goToMyProfile}); + HomePage2({Key key, this.goToMyProfile, this.onLoginClick}); @override _HomePageState2 createState() => _HomePageState2(); @@ -61,6 +39,7 @@ class _HomePageState2 extends State { @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); + return BaseView( onModelReady: (model) => model.getPatientRadOrders(), builder: (_, model, wi) => Container( @@ -70,7 +49,21 @@ class _HomePageState2 extends State { physics: BouncingScrollPhysics(), child: Column( children: [ - !model.isLogin ? HomePageFragment() : LoggedHomePageFragment(projectViewModel), + !model.isLogin + ? HomePageFragment( + onPharmacyClick: () { + getPharmacyToken(model); + }, + onLoginClick: () { + widget.onLoginClick(); + }, + ) + : LoggedHomePageFragment( + projectViewModel, + onPharmacyClick: () { + getPharmacyToken(model); + }, + ), ], ), ), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 2487e12d..11c1d694 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -15,9 +15,9 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; -import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' - as family; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; @@ -63,8 +63,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { var themeNotifier; ///inject the user data - AuthenticatedUserObject authenticatedUserObject = - locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final authService = new AuthProvider(); @@ -72,10 +71,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { var familyFileProvider = family.FamilyFilesProvider(); void _requestIOSPermissions() { - flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - IOSFlutterLocalNotificationsPlugin>() - ?.requestPermissions( + flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.requestPermissions( alert: true, badge: true, sound: true, @@ -107,8 +103,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { print(route.settings.name); } - - //setState(() { print("didChangeAppLifecycleState"); print('state = $state'); @@ -118,12 +112,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { if (LandingPage.isOpenCallPage) { if (!isPageNavigated) { isPageNavigated = true; - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => IncomingCall( - incomingCallData: LandingPage.incomingCallData))) - .then((value) { + Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) { isPageNavigated = false; }); } @@ -157,16 +146,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { pageController = PageController(keepPage: true); _firebaseMessaging.setAutoInitEnabled(true); - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance - .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] HMGNetworkConnectivity(context, () { GifLoaderDialogUtils.showMyDialog(context); - PlatformBridge() - .connectHMGGuestWifi() - .then((value) => {GifLoaderDialogUtils.hideDialog(context)}); + PlatformBridge().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)}); }).checkAndConnectIfNoInternet(); if (Platform.isIOS) { @@ -192,7 +177,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { // if (results[Permission.calendar].isGranted) ; }); - requestPermissions(); // }); // @@ -313,16 +297,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { // ); } - - showDialogs(String message) { ConfirmDialog dialog = new ConfirmDialog( - context: context, - confirmMessage: message, - okText: TranslationBase.of(context).confirm, - cancelText: TranslationBase.of(context).cancel_nocaps, - okFunction: () => {}, - cancelFunction: () => {}); + context: context, confirmMessage: message, okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => {}, cancelFunction: () => {}); dialog.showAlertDialog(context); } @@ -347,8 +324,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { return permissionResults; } - static Future myBackgroundMessageHandler( - Map message) async { + static Future myBackgroundMessageHandler(Map message) async { Map myMap = new Map.from(message['data']); if (message.containsKey('data')) { print("myBackgroundMessageHandler Inside"); @@ -383,8 +359,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { void doIt() { getUserInformation().then((value) { - if (value != null) - projectViewModel.platformBridge().registerHmgGeofences(); + if (value != null) projectViewModel.platformBridge().registerHmgGeofences(); }); } @@ -406,9 +381,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { Navigator.of(context).pushNamed(CONFIRM_LOGIN); } else { GifLoaderDialogUtils.showMyDialog(context); - authService - .selectDeviceImei(DEVICE_TOKEN) - .then((SelectDeviceIMEIRES value) { + authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) { GifLoaderDialogUtils.hideDialog(context); if (value != null) { setUserValues(value); @@ -429,21 +402,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { getNotificationCount(token) async { if (await sharedPref.getObject(USER_PROFILE) != null) { - var data = - AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); if (data != null) { - authService - .registeredAuthenticatedUser(data, token, 0, 0) - .then((res) => {print(res)}); + authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)}); authService.getDashboard().then((value) => { setState(() { - notificationCount = value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] > - 99 - ? '99+' - : value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] - .toString(); + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); }) @@ -461,16 +425,11 @@ class _LandingPageState extends State with WidgetsBindingObserver { appBar: AppBar( elevation: 0, textTheme: TextTheme( - headline6: TextStyle( - color: Theme.of(context).textTheme.headline1.color, - fontWeight: FontWeight.bold), + headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold), ), title: Text( getText(currentTab).toUpperCase(), - style: TextStyle( - fontWeight: FontWeight.bold, - color: Theme.of(context).textTheme.headline1.color, - fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), + style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), // bold: true, // color: Colors.white, ), @@ -553,6 +512,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { goToMyProfile: () { _changeCurrentTab(1); }, + onLoginClick: () { + login(); + }, ), MedicalProfilePage(), BookingOptions(), @@ -565,14 +527,13 @@ class _LandingPageState extends State with WidgetsBindingObserver { index: currentTab, ), floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, - floatingActionButton: - (projectViewModel.havePrivilege(34) && currentTab == 0) - ? FloatingButton( - elevation: true, - onTap: () { - _changeCurrentTab(2); - }) - : null); + floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0) + ? FloatingButton( + elevation: true, + onTap: () { + _changeCurrentTab(2); + }) + : null); } triggerRobot() { @@ -597,22 +558,15 @@ class _LandingPageState extends State with WidgetsBindingObserver { } void checkUserStatus(token) async { - authService - .selectDeviceImei(token) - .then((SelectDeviceIMEIRES value) => setUserValues(value)); + authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); if (projectViewModel.isLoading == true) { - var data = - AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); if (data != null) { - authService - .registeredAuthenticatedUser(data, token, 0, 0) - .then((res) => {print(res)}); + authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)}); authService.getDashboard().then((value) => { setState(() { if (value != null) { - notificationCount = value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] - .toString(); + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); } }) }); diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart index f1beb765..2024cb8e 100644 --- a/lib/pages/landing/widgets/logged_slider_view.dart +++ b/lib/pages/landing/widgets/logged_slider_view.dart @@ -1,16 +1,21 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/models/slider_data.dart'; class LoggedSliderView extends StatelessWidget { + ProjectViewModel projectViewModel; SliderData sliderData; - LoggedSliderView(this.sliderData); + LoggedSliderView(this.projectViewModel, this.sliderData); @override Widget build(BuildContext context) { + //'${DateUtil.getMonthDayYearDateFormatted(sliderData.dateofBirthDataTime)} ,${model.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user.age.toString() + "y"}', return Card( shape: cardRadius(20), elevation: 0, @@ -38,7 +43,9 @@ class LoggedSliderView extends StatelessWidget { height: double.infinity, clipBehavior: Clip.antiAlias, margin: EdgeInsets.zero, - decoration: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor), + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor) + : containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor), child: Card( color: Colors.transparent, margin: EdgeInsets.zero, @@ -50,21 +57,22 @@ class LoggedSliderView extends StatelessWidget { Row( children: [ Container( - decoration: containerColorRadiusRight(Color(0xFFFBF2E31), 100), + decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100), padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6), child: Text( - "Medical File", + TranslationBase.of(context).medicalFile, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13), ), ), mWidth(MediaQuery.of(context).size.width / 50), //circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white), mFlex(1), + projectViewModel.isArabic?circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white):Container(), Text( - "Verified", + TranslationBase.of(context).verified, style: TextStyle(color: Colors.white, fontSize: 10), ), - circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white), + !projectViewModel.isArabic?circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white):Container(), mWidth(MediaQuery.of(context).size.width / 70), ], ), @@ -102,15 +110,25 @@ class LoggedSliderView extends StatelessWidget { ), ), ), - Positioned( - child: Icon( - Icons.arrow_forward_rounded, - color: Colors.white, - size: 20, - ), - bottom: 8, - right: 8, - ), + projectViewModel.isArabic + ? Positioned( + child: Icon( + Icons.arrow_forward, + color: Colors.white, + size: 20, + ), + bottom: 8, + left: 8, + ) + : Positioned( + child: Icon( + Icons.arrow_forward_rounded, + color: Colors.white, + size: 20, + ), + bottom: 8, + right: 8, + ), ], ), ), diff --git a/lib/pages/landing/widgets/pharmacy_view.dart b/lib/pages/landing/widgets/pharmacy_view.dart index c065c7a1..ad33f529 100644 --- a/lib/pages/landing/widgets/pharmacy_view.dart +++ b/lib/pages/landing/widgets/pharmacy_view.dart @@ -1,40 +1,57 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; class PharmacyView extends StatelessWidget { + Function onPharmacyClick; + PharmacyView({this.onPharmacyClick}); @override Widget build(BuildContext context) { - return Container( - width: double.infinity, - decoration: containerColorRadiusBorderWidth(Colors.grey[200], 16, Colors.grey[300], 2), - padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset("assets/images/new/Pharmacy.svg"), - mWidth(12), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "HMG Pharmacy", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16, - ), + return InkWell( + onTap: (){ + onPharmacyClick(); + }, + child: Container( + width: double.infinity, + decoration: + containerBottomRightRadiusWithGradientBorder(16, darkColor: CustomColors.darkGreyColor.withOpacity(0.5), lightColor: CustomColors.lightGreyColor, borderColor: Color(0xFFcccccc), w: 1), + padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset("assets/images/new/Pharmacy.svg"), + mWidth(12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).HMGPharmacy, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + Text( + TranslationBase.of(context).ecommerceSolution, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14, + ), + ), + ], ), - Text( - "Ecommerce Solution", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14, - ), - ), - ], - ) - ], + ), + mWidth(12), + Opacity( + opacity: 0.2, + child: SvgPicture.asset("assets/images/new/Pharmacy.svg"), + ), + ], + ), ), ); } diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index 2900d0b1..6180ae3a 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -1,8 +1,15 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/models/hmg_services.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -14,86 +21,95 @@ class ServicesView extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - width: double.infinity, - height: double.infinity, - decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor), - child: Stack( - children: [ - Container( - width: double.infinity, - height: double.infinity, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - mFlex(1), - Flexible( - flex: 8, - child: Column( - children: [ - Flexible( - flex: 5, - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Opacity( - opacity: 0.07, - child: SvgPicture.asset( - hmgServices.icon, - width: double.infinity, - height: double.infinity, + return InkWell( + onTap: () { + if (index == 0) { + Navigator.push(context, FadePage(page: LiveCareHome())); + } else if (index == 1) { + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + } else if (index == 2) { + Navigator.push(context, FadePage(page: CMCPage())); + } else if (index == 3) { + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + } else if (index == 4) { + Navigator.push(context, FadePage(page: EReferralPage())); + } else if (index == 5) { + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + } + }, + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor), + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + mFlex(1), + Flexible( + flex: 8, + child: Column( + children: [ + Flexible( + flex: 5, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Opacity( + opacity: 0.07, + child: SvgPicture.asset( + hmgServices.icon, + width: double.infinity, + height: double.infinity, + ), ), ), ), - ), - mFlex(1), - ], + mFlex(1), + ], + ), ), - ), - ], + ], + ), ), - ), - Container( - width: double.infinity, - height: double.infinity, - padding: EdgeInsets.all(MediaQuery.of(context).size.width / 30), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - mFlex(1), - SvgPicture.asset( - hmgServices.icon, - height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 14, - ), - mFlex(2), - Text( - hmgServices.title, - style: TextStyle( - fontSize: SizeConfig.textMultiplier * 1.9, - fontWeight: FontWeight.bold, + Container( + width: double.infinity, + height: double.infinity, + padding: EdgeInsets.only(left: SizeConfig.widthMultiplier * 3, right: SizeConfig.widthMultiplier * 3, top: SizeConfig.widthMultiplier * 3, bottom: SizeConfig.widthMultiplier * 2), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mFlex(1), + SvgPicture.asset( + hmgServices.icon, + height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 14, ), - ), - Container( - width: double.infinity, - child: Row( - children: [ - Expanded( - child: AutoSizeText( - hmgServices.subTitle, - maxLines: 1, - style: TextStyle( - fontSize: SizeConfig.textMultiplier * 1.2, - ), - ), - ), - ], + mFlex(4), + AutoSizeText( + hmgServices.title, + maxLines: 1, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.9, + fontWeight: FontWeight.bold, + ), + ), + AutoSizeText( + hmgServices.subTitle, + maxLines: 1, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 0.9, + ), ), - ), - mFlex(1), - ], + mFlex(1), + ], + ), ), - ), - ], + ], + ), ), ); } diff --git a/lib/pages/landing/widgets/slider_view.dart b/lib/pages/landing/widgets/slider_view.dart index e999ea25..ab02ecf3 100644 --- a/lib/pages/landing/widgets/slider_view.dart +++ b/lib/pages/landing/widgets/slider_view.dart @@ -1,10 +1,21 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; import 'dart:math'; +import 'package:provider/provider.dart'; + class SliderView extends StatelessWidget { + Function onLoginClick; + + SliderView({this.onLoginClick}); + + ProjectViewModel projectViewModel; @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return Card( shape: cardRadius(20), elevation: 0, @@ -21,7 +32,7 @@ class SliderView extends StatelessWidget { height: double.infinity, clipBehavior: Clip.antiAlias, margin: EdgeInsets.zero, - decoration: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4), + decoration:projectViewModel.isArabic?containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4): containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4), child: Card( color: Colors.transparent, margin: EdgeInsets.zero, @@ -30,21 +41,21 @@ class SliderView extends StatelessWidget { children: [ mFlex(3), Container( - decoration: containerColorRadiusRight(Color(0xFFFBF2E31), 100), - padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6), + decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100), + padding: EdgeInsets.only(left: projectViewModel.isArabic ?16:20, right: projectViewModel.isArabic ?20:16, top: 6, bottom: 6), child: Text( - "Medical File", + TranslationBase.of(context).medicalFile, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13), ), ), mFlex(2), Padding( - padding: const EdgeInsets.only(left: 20), + padding: const EdgeInsets.only(left: 20,right: 20), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Can’t see your medical File?", + TranslationBase.of(context).cantSeeProfile, style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, @@ -52,7 +63,7 @@ class SliderView extends StatelessWidget { ), ), Text( - "Login or Register Now", + TranslationBase.of(context).loginRegisterNow, style: TextStyle(color: Colors.white, fontSize: 14), ), ], @@ -60,19 +71,25 @@ class SliderView extends StatelessWidget { ), mFlex(2), Padding( - padding: const EdgeInsets.only(left: 20), + padding: const EdgeInsets.only(left: 20,right: 20), child: Container( height: MediaQuery.of(context).size.width / 14, - width: MediaQuery.of(context).size.width / 6, + width: MediaQuery.of(context).size.width /(projectViewModel.isArabic?4: 6), child: RaisedButton( shape: cardRadius(8), color: Color(0xFFFBF2E31), padding: EdgeInsets.zero, - onPressed: () {}, - child: Text( - "Login", - style: TextStyle( - color: Colors.white, + onPressed: () { + onLoginClick(); + }, + child: Center( + child: AutoSizeText( + TranslationBase.of(context).login, + maxLines: 1, + style: TextStyle( + color: Colors.white, + fontSize: 14 + ), ), ), ), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 8d49a89b..6d691805 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -1,6 +1,7 @@ import 'dart:math'; import 'package:badges/badges.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -61,11 +62,7 @@ class _MedicalProfilePageState extends State { Widget build(BuildContext context) { projectViewModel = Provider.of(context); var appoCountProvider = Provider.of(context); - List myMedicalList = Utils.myMedicalList( - projectViewModel: projectViewModel, - context: context, - count: appoCountProvider.count, - isLogin: projectViewModel.isLogin); + List myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); return BaseView( onModelReady: (model) => model.getAppointmentHistory(), builder: (_, model, widget) => AppScaffold( @@ -79,6 +76,7 @@ class _MedicalProfilePageState extends State { Stack( children: [ Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( width: double.infinity, @@ -93,14 +91,11 @@ class _MedicalProfilePageState extends State { ), if (model.isLogin) ListView.builder( - itemBuilder: (context, index) => - TimeLineWidget( + itemBuilder: (context, index) => TimeLineWidget( isUp: index % 2 == 1, - appoitmentAllHistoryResul: model - .appoitmentAllHistoryResultList[index], + appoitmentAllHistoryResul: model.appoitmentAllHistoryResultList[index], ), - itemCount: model - .appoitmentAllHistoryResultList.length, + itemCount: model.appoitmentAllHistoryResultList.length, scrollDirection: Axis.horizontal, reverse: projectViewModel.isArabic, ), @@ -108,28 +103,54 @@ class _MedicalProfilePageState extends State { ), ), SizedBox( - height: 50, + height: 20, ), Padding( - padding: EdgeInsets.symmetric(vertical: 5.0), + padding: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + projectViewModel.isLogin + ? Text( + projectViewModel?.user?.firstNameN ?? "", + style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8), + ) + : Container(), + Text( + TranslationBase.of(context).medicalFile, + style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 3), + ), + ], + ), + ), + SizedBox( + height: 20, + ), + Padding( + padding: EdgeInsets.only(left: 12, right: 12), child: GridView.builder( shrinkWrap: true, primary: false, physics: NeverScrollableScrollPhysics(), - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3, - childAspectRatio: MediaQuery.of(context) - .size - .width / - (MediaQuery.of(context).size.height / 2.20), - ), + // gridDelegate: + // SliverGridDelegateWithFixedCrossAxisCount( + // crossAxisCount: 3, + // childAspectRatio: MediaQuery.of(context) + // .size + // .width / + // (MediaQuery.of(context).size.height / 2.20), + // ), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, itemCount: myMedicalList.length, itemBuilder: (BuildContext context, int index) { return myMedicalList[index]; }, ), - ) + ), + SizedBox( + height: 12, + ), ], ), SizedBox( @@ -146,14 +167,9 @@ class _MedicalProfilePageState extends State { decoration: BoxDecoration( color: Colors.grey[500], shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, width: 0.5), - borderRadius: - BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/bg_graphic.png'), - fit: BoxFit.cover)), + border: Border.all(color: Colors.transparent, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(9)), + image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -162,9 +178,7 @@ class _MedicalProfilePageState extends State { height: 8, ), Texts( - model.user.firstName + - " " + - model.user.lastName, + model.user.firstName + " " + model.user.lastName, color: Colors.white, bold: true, ), diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart new file mode 100644 index 00000000..285dd704 --- /dev/null +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -0,0 +1,164 @@ +import 'dart:math'; + +import 'package:badges/badges.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; +import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_new_widget.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; +import 'package:provider/provider.dart'; +import '../../locator.dart'; +import '../../uitl/gif_loader_dialog_utils.dart'; +import 'active_medications/ActiveMedicationsPage.dart'; +import 'allergies_page.dart'; +import 'ask_doctor/ask_doctor_home_page.dart'; +import 'balance/my_balance_page.dart'; +import 'doctor/doctor_home_page.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; +import 'eye/EyeHomePage.dart'; +import 'eye/EyeMeasurementsPage.dart'; +import 'labs/labs_home_page.dart'; +import 'my_trackers/my_trackers.dart'; + +class MedicalProfilePageNew extends StatefulWidget { + @override + _MedicalProfilePageState createState() => _MedicalProfilePageState(); +} + +class _MedicalProfilePageState extends State { + var authProvider = new AuthProvider(); + List medical = List(); + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + var appoCountProvider = Provider.of(context); + List myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); + return BaseView( + onModelReady: (model) => model.getAppointmentHistory(), + builder: (_, model, widget) => AppScaffold( + isShowDecPage: false, + baseViewModel: model, + isHelp: true, + body: Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + height: 210, + decoration: containerBottomRightRadiusWithGradientBorder(0, darkColor: Color(0xFFF2B353E), lightColor: Color(0xFFF2B353E)), + child: Stack( + children: [ + if (model.isLogin) + ListView.builder( + itemBuilder: (context, index) => TimeLineWidget( + isUp: index % 2 == 1, + appoitmentAllHistoryResul: model.appoitmentAllHistoryResultList[index], + ), + itemCount: model.appoitmentAllHistoryResultList.length, + scrollDirection: Axis.horizontal, + reverse: projectViewModel.isArabic, + ), + ], + ), + ), + TimeLineView(model.isLogin, projectViewModel.isArabic, model.appoitmentAllHistoryResultList), + SizedBox( + height: 20, + ), + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + projectViewModel.isLogin + ? Text( + projectViewModel?.user?.firstName ?? "", + style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8), + ) + : Container(), + Text( + TranslationBase.of(context).medicalFile, + style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 3), + ), + ], + ), + ), + SizedBox( + height: 20, + ), + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + // gridDelegate: + // SliverGridDelegateWithFixedCrossAxisCount( + // crossAxisCount: 3, + // childAspectRatio: MediaQuery.of(context) + // .size + // .width / + // (MediaQuery.of(context).size.height / 2.20), + // ), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: myMedicalList.length, + itemBuilder: (BuildContext context, int index) { + return myMedicalList[index]; + }, + ), + ), + SizedBox( + height: 12, + ), + ], + ), + ), + ), + ), + ); + } +} + +class Medical { + final String title; + final String imagePath; + final String subTitle; + final Widget page; + + Medical({this.title, this.imagePath, this.subTitle, this.page}); +} diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 65fe2b04..a7d9f826 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -568,6 +568,8 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } + + Future getPatientAppointmentCurfewHistory( bool isActiveAppointment) async { Map request; diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart index 88acc553..6305528d 100644 --- a/lib/theme/colors.dart +++ b/lib/theme/colors.dart @@ -5,6 +5,7 @@ class CustomColors { static const Color purple = Color(0xFF6002EE); static const Color deepPurple = Color(0xFF3900B1); static const Color grey = Color(0xFF848484); + static const Color grey2 = Color(0xFFA5A5A5); static const Color darkGrey = Color(0xFF222222); static const Color black = Color(0xFF141414); static const Color white = Color(0xFFFFFFFF); diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index b5d5ab59..85e2e0e0 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -308,6 +308,26 @@ class DateUtil { return ""; } + /// get data formatted like 26/4/2020 + static String getDayMonthYearLangDateFormatted( + DateTime dateTime, String lang) { + if (dateTime != null) + return lang == 'en' + ? dateTime.day.toString() + + " " + + getMonth(dateTime.month) + + + " " + + dateTime.year.toString() + : dateTime.day.toString() + + " " + + getMonthArabic(dateTime.month) + + " " + + dateTime.year.toString(); + else + return ""; + } + /// get data formatted like 26/4/2020 /// [dateTime] convert DateTime to data formatted static String getDayMonthYearDateFormatted(DateTime dateTime) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 6f82ca8d..6c14715d 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -133,6 +133,7 @@ class TranslationBase { String get no => localizedValues['no'][locale.languageCode]; String get logintypeRadio => localizedValues['logintyperadio'][locale.languageCode]; + String get registerInfoFamily => localizedValues['register-info-family'][locale.languageCode]; String get registerNow => localizedValues['registernow'][locale.languageCode]; @@ -142,7 +143,9 @@ class TranslationBase { String get idNo => localizedValues['national-id'][locale.languageCode]; String get fileNo => localizedValues['fileNo'][locale.languageCode]; + String get fileno => localizedValues['fileno'][locale.languageCode]; + String get forgotPassword => localizedValues['forgotFileNo'][locale.languageCode]; String get forgotFileNoTitle => localizedValues['forgotFileNoTitle'][locale.languageCode]; @@ -202,6 +205,7 @@ class TranslationBase { String get upcomingConfirm => localizedValues['upcoming-confirm'][locale.languageCode]; String get upcomingPaymentPending => localizedValues['upcoming-payment-pending'][locale.languageCode]; + String get upcomingConfirmMore => localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; String get upcomingPaymentNow => localizedValues['upcoming-payment-now'][locale.languageCode]; @@ -230,6 +234,38 @@ class TranslationBase { String get online => localizedValues['online'][locale.languageCode]; + String get viewMedicalFile => localizedValues['viewMedicalFile'][locale.languageCode]; + + String get viewAllServices => localizedValues['viewAllServices'][locale.languageCode]; + + String get medicalFile => localizedValues['medicalFile'][locale.languageCode]; + + String get verified => localizedValues['verified'][locale.languageCode]; + + String get onlineConsulting => localizedValues['onlineConsulting'][locale.languageCode]; + + String get checkup => localizedValues['checkup'][locale.languageCode]; + + String get comprehensive => localizedValues['comprehensive'][locale.languageCode]; + + String get hhcHome => localizedValues['hhcHome'][locale.languageCode]; + + String get refferal => localizedValues['refferal'][locale.languageCode]; + + String get healthCare => localizedValues['healthCare'][locale.languageCode]; + + String get emergency => localizedValues['emergency'][locale.languageCode]; + + String get cantSeeProfile => localizedValues['cantSeeProfile'][locale.languageCode]; + + String get loginRegisterNow => localizedValues['loginRegisterNow'][locale.languageCode]; + + String get HMGPharmacy => localizedValues['HMGPharmacy'][locale.languageCode]; + + String get ecommerceSolution => localizedValues['ecommerceSolution'][locale.languageCode]; + + String get services2 => localizedValues['services2'][locale.languageCode]; + String get payment => localizedValues['payment'][locale.languageCode]; String get cancel_nocaps => localizedValues['cancel-nocaps'][locale.languageCode]; @@ -239,6 +275,7 @@ class TranslationBase { String get pharmaciesList => localizedValues['pharmaciesList'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode]; + String get howToUse => localizedValues['howToUse'][locale.languageCode]; String get price => localizedValues['price'][locale.languageCode]; @@ -258,14 +295,23 @@ class TranslationBase { String get appsetting => localizedValues['app-settings'][locale.languageCode]; String get rateApp => localizedValues['rate-app'][locale.languageCode]; + String get setReminder => localizedValues['set-reminder'][locale.languageCode]; + String get before => localizedValues['before'][locale.languageCode]; + String get minute => localizedValues['minute'][locale.languageCode]; + String get hour => localizedValues['hour'][locale.languageCode]; + String get reminderSuccess => localizedValues['reminderSuccess'][locale.languageCode]; + String get patientShareToDo => localizedValues['patientShareToDo'][locale.languageCode]; + String get patientTaxToDo => localizedValues['patientTaxToDo'][locale.languageCode]; + String get patientShareTotalToDo => localizedValues['patientShareTotalToDo'][locale.languageCode]; + String get paymentMethod => localizedValues['paymentMethod'][locale.languageCode]; String get moreVerification => localizedValues['more-verify'][locale.languageCode]; @@ -279,21 +325,37 @@ class TranslationBase { String get next => localizedValues['next'][locale.languageCode]; String get noNeedToWaitInLine => localizedValues['noNeedToWaitInLine'][locale.languageCode]; + String get useQRAppoAttend => localizedValues['useQRAppoAttend'][locale.languageCode]; + String get passQRAppoAttend => localizedValues['passQRAppoAttend'][locale.languageCode]; + String get sitWaitingQR => localizedValues['sitWaitingQR'][locale.languageCode]; + String get attendRegisterCode => localizedValues['attendRegisterCode'][locale.languageCode]; + String get scanQRHospital => localizedValues['scanQRHospital'][locale.languageCode]; + String get sendEmail => localizedValues['sendEmail'][locale.languageCode]; + String get close => localizedValues['close'][locale.languageCode]; + String get booked => localizedValues['booked'][locale.languageCode]; + String get confirmed => localizedValues['confirmed'][locale.languageCode]; + String get arrived => localizedValues['arrived'][locale.languageCode]; + String get payNowBookSuccess => localizedValues['payNowBookSuccess'][locale.languageCode]; + String get payNowBookSuccesstext1 => localizedValues['payNowBookSuccesstext1'][locale.languageCode]; + String get payNowBookSuccesstext2 => localizedValues['payNowBookSuccesstext2'][locale.languageCode]; + String get payLater => localizedValues['payLater'][locale.languageCode]; + String get askDocNotAllowed => localizedValues['askDocNotAllowed'][locale.languageCode]; + String get firstName => localizedValues['first-name'][locale.languageCode]; String get middleName => localizedValues['middle-name'][locale.languageCode]; @@ -321,15 +383,21 @@ class TranslationBase { String get family => localizedValues['family'][locale.languageCode]; String get myFamilyFiles => localizedValues['family-title'][locale.languageCode]; + String get myFamily => localizedValues['myFamily'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; + String get respirationRate => localizedValues['respirationRate'][locale.languageCode]; String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; + String get height => localizedValues['height'][locale.languageCode]; + String get heightUnit => localizedValues['heightUnit'][locale.languageCode]; + String get weightUnit => localizedValues['weightUnit'][locale.languageCode]; + String get temperature => localizedValues['temperature'][locale.languageCode]; String get pulse => localizedValues['pulse'][locale.languageCode]; @@ -337,834 +405,1579 @@ class TranslationBase { String get respiration => localizedValues['respiration'][locale.languageCode]; String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; + String get painScale => localizedValues['painScale'][locale.languageCode]; + String get heart => localizedValues['heart'][locale.languageCode]; String get weight => localizedValues['weight'][locale.languageCode]; String get request => localizedValues['request'][locale.languageCode]; + String get memberName => localizedValues['member-name'][locale.languageCode]; + String get switchUser => localizedValues['switch-login'][locale.languageCode]; + String get removeMember => localizedValues['remove-membe'][locale.languageCode]; + String get allowView => localizedValues['allow-view'][locale.languageCode]; + String get rejectView => localizedValues['reject-view'][locale.languageCode]; + String get deleteView => localizedValues['delete-view'][locale.languageCode]; + String get approvals => localizedValues['approvals'][locale.languageCode]; + String get approvalNo => localizedValues['approvalNo'][locale.languageCode]; + String get companyName => localizedValues['companyName'][locale.languageCode]; + String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; + String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; + String get procedureName => localizedValues['procedureName'][locale.languageCode]; + String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; + String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; + String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; + String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; + String get category => localizedValues['category'][locale.languageCode]; + String get expirationDate => localizedValues['expirationDate'][locale.languageCode]; + String get patientCard => localizedValues['patientCard'][locale.languageCode]; + String get policyNumber => localizedValues['policyNumber'][locale.languageCode]; + String get seeDetails => localizedValues['seeDetails'][locale.languageCode]; + String get insuranceCards => localizedValues['insuranceCards'][locale.languageCode]; + String get requestType => localizedValues['requestType'][locale.languageCode]; + String get addFamilyMember => localizedValues['add-new-member'][locale.languageCode]; + String get removeFamilyMember => localizedValues['remove-family-member'][locale.languageCode]; String get myMedicalFile => localizedValues['MyMedicalFile'][locale.languageCode]; + String get myMedicalFileSubTitle => localizedValues['myMedicalFileSubTitle'][locale.languageCode]; + String get viewMore => localizedValues['viewMore'][locale.languageCode]; + String get homeHealthCareService => localizedValues['homeHealthCareService'][locale.languageCode]; + String get onlinePharmacy => localizedValues['OnlinePharmacy'][locale.languageCode]; + String get emergencyService => localizedValues['EmergencyService'][locale.languageCode]; + String get onlinePaymentService => localizedValues['OnlinePaymentService'][locale.languageCode]; + String get offersAndPackages => localizedValues['OffersAndPackages'][locale.languageCode]; + String get comprehensiveMedicalCheckup => localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; + String get hMGService => localizedValues['HMGService'][locale.languageCode]; + String get viewAllHabibMedicalService => localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; + String get viewAll => localizedValues['viewAll'][locale.languageCode]; + String get view => localizedValues['view'][locale.languageCode]; + String get contactUs => localizedValues['ContactUs'][locale.languageCode]; + String get viewAllWaysReachUs => localizedValues['ViewAllWaysReachUs'][locale.languageCode]; + String get medicalProfile => localizedValues['medicalProfile'][locale.languageCode]; + String get parking => localizedValues['parking'][locale.languageCode]; + String get alhabiServices => localizedValues['alhabiServices'][locale.languageCode]; + String get parkingTitle => localizedValues['parkingTitle'][locale.languageCode]; + String get readBarcode => localizedValues['readBarcode'][locale.languageCode]; + String get showMyPark => localizedValues['showMyPark'][locale.languageCode]; + String get clearMyData => localizedValues['clearMyData'][locale.languageCode]; + String get floor => localizedValues['floor'][locale.languageCode]; + String get gate => localizedValues['gate'][locale.languageCode]; + String get building => localizedValues['building'][locale.languageCode]; + String get branch => localizedValues['branch'][locale.languageCode]; + String get emergencyServices => localizedValues['emergencyServices'][locale.languageCode]; + String get nearester => localizedValues['nearester'][locale.languageCode]; + String get locationa => localizedValues['locationa'][locale.languageCode]; + String get ambulancerequest => localizedValues['ambulancerequest'][locale.languageCode]; + String get requestA => localizedValues['requestA'][locale.languageCode]; + String get consultation => localizedValues['consultation'][locale.languageCode]; + String get logs => localizedValues['logs'][locale.languageCode]; + String get textToSpeech => localizedValues['textToSpeech'][locale.languageCode]; String get myAppointments => localizedValues['MyAppointments'][locale.languageCode]; + String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode]; + String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode]; + String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode]; + String get myAppointmentsList => localizedValues['MyAppointmentsList'][locale.languageCode]; + String get radiology => localizedValues['Radiology'][locale.languageCode]; + String get radiologySubtitle => localizedValues['RadiologySubtitle'][locale.languageCode]; + String get lab => localizedValues['Lab'][locale.languageCode]; + String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode]; + String get medicines => localizedValues['Medicines'][locale.languageCode]; + String get medicinesSubtitle => localizedValues['MedicinesSubtitle'][locale.languageCode]; + String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode]; + String get vitalSignsSubtitle => localizedValues['VitalSignsSubTitle'][locale.languageCode]; + String get myMedical => localizedValues['MyMedical'][locale.languageCode]; + String get myMedicalSubtitle => localizedValues['MyMedicalSubtitle'][locale.languageCode]; + String get myDoctor => localizedValues['MyDoctor'][locale.languageCode]; + String get myDoctorSubtitle => localizedValues['MyDoctorSubtitle'][locale.languageCode]; + String get eye => localizedValues['Eye'][locale.languageCode]; + String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode]; + String get insurance => localizedValues['Insurance'][locale.languageCode]; + String get insuranceSubtitle => localizedValues['InsuranceSubtitle'][locale.languageCode]; + String get updateInsurance => localizedValues['UpdateInsurance'][locale.languageCode]; + String get updateInsuranceSubtitle => localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; + String get insuranceApproval => localizedValues['InsuranceApproval'][locale.languageCode]; + String get insuranceApprovalSubtitle => localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; + String get allergies => localizedValues['Allergies'][locale.languageCode]; + String get allergiesSubtitle => localizedValues['AllergiesSubtitle'][locale.languageCode]; + String get myVaccines => localizedValues['MyVaccines'][locale.languageCode]; + String get myVaccinesSubtitle => localizedValues['MyVaccinesSubtitle'][locale.languageCode]; + String get medical => localizedValues['Medical'][locale.languageCode]; + String get medicalSubtitle => localizedValues['MedicalSubtitle'][locale.languageCode]; + String get monthly => localizedValues['Monthly'][locale.languageCode]; + String get monthlySubtitle => localizedValues['MonthlySubtitle'][locale.languageCode]; + String get sick => localizedValues['Sick'][locale.languageCode]; + String get sickSubtitle => localizedValues['SickSubtitle'][locale.languageCode]; + String get myBalance => localizedValues['MyBalance'][locale.languageCode]; + String get myBalanceSubtitle => localizedValues['MyBalanceSubtitle'][locale.languageCode]; + String get patientCall => localizedValues['PatientCall'][locale.languageCode]; + String get patientCallSubtitle => localizedValues['PatientCallSubtitle'][locale.languageCode]; + String get smartWatches => localizedValues['SmartWatches'][locale.languageCode]; + String get smartWatchesSubtitle => localizedValues['SmartWatchesSubtitle'][locale.languageCode]; + String get myTrackers => localizedValues['MyTrackers'][locale.languageCode]; + String get myTrackersSubtitle => localizedValues['MyTrackersSubtitle'][locale.languageCode]; + String get askYour => localizedValues['AskYour'][locale.languageCode]; + String get askYourSubtitle => localizedValues['AskYourSubtitle'][locale.languageCode]; + String get internet => localizedValues['Internet'][locale.languageCode]; + String get internetSubtitle => localizedValues['InternetSubtitle'][locale.languageCode]; + String get chatbot => localizedValues['Chatbot'][locale.languageCode]; + String get chatbotSubtitle => localizedValues['ChatbotSubtitle'][locale.languageCode]; + String get timeLine => localizedValues['TimeLine'][locale.languageCode]; + String get labOrders => localizedValues['LabOrders'][locale.languageCode]; + String get billNo => localizedValues['BillNo'][locale.languageCode]; + String get prescriptions => localizedValues['Prescriptions'][locale.languageCode]; + String get history => localizedValues['History'][locale.languageCode]; + String get orderNo => localizedValues['OrderNo'][locale.languageCode]; + String get trackDeliveryDriver => localizedValues['trackDeliveryDriver'][locale.languageCode]; + String get orderDetails => localizedValues['OrderDetails'][locale.languageCode]; + String get vitalSign => localizedValues['VitalSign'][locale.languageCode]; + String get monthlyReports => localizedValues['MonthlyReports'][locale.languageCode]; String get locationDialogMessage => localizedValues['locationDialogMessage'][locale.languageCode]; + String get userViewRequest => localizedValues['user-view-requester'][locale.languageCode]; + String get userView => localizedValues['user-view'][locale.languageCode]; + String get sentRequest => localizedValues['sent-requests'][locale.languageCode]; + String get km => localizedValues['km'][locale.languageCode]; + String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; + String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; + String get clickHere => localizedValues['ClickHere'][locale.languageCode]; + String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; + String get iAgreeToTheTermsAndConditionsSubtitle => localizedValues['IAgreeToTheTermsAndConditionsSubtitle'][locale.languageCode]; + String get save => localizedValues['Save'][locale.languageCode]; + String get userAgreement => localizedValues['UserAgreement'][locale.languageCode]; + String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode]; + String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode]; + String get EmailSentError => localizedValues['EmailSentError'][locale.languageCode]; + String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; + String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode]; + String get paymentService => localizedValues['PaymentService'][locale.languageCode]; + String get paymentOnline => localizedValues['PaymentOnline'][locale.languageCode]; + String get onlineCheckIn => localizedValues['OnlineCheckIn'][locale.languageCode]; + String get myBalances => localizedValues['MyBalances'][locale.languageCode]; + String get balanceAmount => localizedValues['BalanceAmount'][locale.languageCode]; + String get totalBalance => localizedValues['TotalBalance'][locale.languageCode]; + String get createAdvancedPayment => localizedValues['CreateAdvancedPayment'][locale.languageCode]; + String get advancePayment => localizedValues['AdvancePayment'][locale.languageCode]; + String get advancePaymentLabel => localizedValues['AdvancePaymentLabel'][locale.languageCode]; + String get referralRequesterInformation => localizedValues['referralRequesterInformation'][locale.languageCode]; + String get fileNumber => localizedValues['FileNumber'][locale.languageCode]; + String get amount => localizedValues['Amount'][locale.languageCode]; + String get depositorEmail => localizedValues['DepositorEmail'][locale.languageCode]; + String get notes => localizedValues['Notes'][locale.languageCode]; + String get selectPatientName => localizedValues['SelectPatientName'][locale.languageCode]; + String get selectFamilyPatientName => localizedValues['SelectFamilyPatientName'][locale.languageCode]; + String get selectHospital => localizedValues['SelectHospital'][locale.languageCode]; + String get selectCity => localizedValues['selectCity'][locale.languageCode]; + String get myAccount => localizedValues['MyAccount'][locale.languageCode]; + String get otherAccount => localizedValues['OtherAccount'][locale.languageCode]; + String get selectBeneficiary => localizedValues['SelectBeneficiary'][locale.languageCode]; + String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode]; + String get depositorName => localizedValues['DepositorName'][locale.languageCode]; + String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode]; + String get ok => localizedValues['Ok'][locale.languageCode]; + String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; + String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; + String get theVerificationCodeExpiresIn => localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; + String get pleaseEnterTheVerificationCode => localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; + String get eyeMeasurements => localizedValues['EyeMeasurements'][locale.languageCode]; + String get measurements => localizedValues['Measurements'][locale.languageCode]; + String get classes => localizedValues['Classes'][locale.languageCode]; + String get contactLens => localizedValues['ContactLens'][locale.languageCode]; + String get rightEye => localizedValues['RightEye'][locale.languageCode]; + String get sphere => localizedValues['Sphere'][locale.languageCode]; + String get cylinder => localizedValues['Cylinder'][locale.languageCode]; + String get axis => localizedValues['Axis'][locale.languageCode]; + String get prism => localizedValues['Prism'][locale.languageCode]; + String get va => localizedValues['VA'][locale.languageCode]; + String get leftEye => localizedValues['LeftEye'][locale.languageCode]; + String get brand => localizedValues['Brand'][locale.languageCode]; + String get power => localizedValues['Power'][locale.languageCode]; + String get diameter => localizedValues['Diameter'][locale.languageCode]; + String get remarks => localizedValues['Remarks'][locale.languageCode]; + String get activeMedications => localizedValues['ActiveMedications'][locale.languageCode]; + String get expDate => localizedValues['ExpDate'][locale.languageCode]; + String get route => localizedValues['Route'][locale.languageCode]; + String get frequency => localizedValues['Frequency'][locale.languageCode]; + String get dailyQuantity => localizedValues['DailyQuantity'][locale.languageCode]; + String get addReminder => localizedValues['AddReminder'][locale.languageCode]; + String get reminderDes => localizedValues['reminderDes'][locale.languageCode]; + String get startDay => localizedValues['StartDay'][locale.languageCode]; + String get endDay => localizedValues['EndDay'][locale.languageCode]; + String get days => localizedValues['Days'][locale.languageCode]; + String get scheduleTime => localizedValues['ScheduleTime'][locale.languageCode]; + String get askDoctor => localizedValues['AskDoctor'][locale.languageCode]; + String get doctorResponses => localizedValues['DoctorResponses'][locale.languageCode]; + String get newDes => localizedValues['New'][locale.languageCode]; + String get all => localizedValues['All'][locale.languageCode]; + String get questionHere => localizedValues['QuestionHere'][locale.languageCode]; + String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode]; + String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode]; + String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; + String get infoLab => localizedValues['info-lab'][locale.languageCode]; + String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; + String get orders => localizedValues['orders'][locale.languageCode]; + String get lakum => localizedValues['lakum'][locale.languageCode]; + String get wishlist => localizedValues['wishlist'][locale.languageCode]; + String get reviews => localizedValues['reviews'][locale.languageCode]; + String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; + String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; + String get pillReminder => localizedValues['pillReminder'][locale.languageCode]; + String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode]; + String get reachUs => localizedValues['reachUs'][locale.languageCode]; + String get ourLocations => localizedValues['ourLocations'][locale.languageCode]; + String get edit => localizedValues['edit'][locale.languageCode]; + String get delete => localizedValues['delete'][locale.languageCode]; + String get addAddress => localizedValues['addAddress'][locale.languageCode]; + String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode]; + String get order => localizedValues['order'][locale.languageCode]; + String get delivered => localizedValues['delivered'][locale.languageCode]; + String get processing => localizedValues['processing'][locale.languageCode]; + String get pending => localizedValues['pending'][locale.languageCode]; + String get cancelled => localizedValues['cancelled'][locale.languageCode]; + String get writeReview => localizedValues['writeReview'][locale.languageCode]; + String get shareReview => localizedValues['shareReview'][locale.languageCode]; + String get backMyAccount => localizedValues['backMyAccount'][locale.languageCode]; + String get reviewSuccessful => localizedValues['reviewSuccessful'][locale.languageCode]; + String get reviewShared => localizedValues['reviewShared'][locale.languageCode]; + String get reviewComment => localizedValues['reviewComment'][locale.languageCode]; + String get shippedMethod => localizedValues['shippedMethod'][locale.languageCode]; + String get orderDetail => localizedValues['orderDetail'][locale.languageCode]; + String get deliveryDriverTrack => localizedValues['DeliveryDriverTrack'][locale.languageCode]; + String get deliveryLocation => localizedValues['DeliveryLocation'][locale.languageCode]; + String get driver => localizedValues['Driver'][locale.languageCode]; + String get subtotal => localizedValues['subtotal'][locale.languageCode]; + String get shipping => localizedValues['shipping'][locale.languageCode]; + String get shipBy => localizedValues['shipBy'][locale.languageCode]; + String get lakumPoints => localizedValues['lakumPoints'][locale.languageCode]; + String get use => localizedValues['use'][locale.languageCode]; + String get proceedPay => localizedValues['proceedPay'][locale.languageCode]; + String get vat => localizedValues['vat'][locale.languageCode]; + String get inclusiveVat => localizedValues['inclusiveVat'][locale.languageCode]; + String get items => localizedValues['items'][locale.languageCode]; + String get checkOut => localizedValues['checkOut'][locale.languageCode]; + String get total => localizedValues['total'][locale.languageCode]; + String get sar => localizedValues['sar'][locale.languageCode]; + String get payOnline => localizedValues['payOnline'][locale.languageCode]; + String get cancelOrder => localizedValues['cancelOrder'][locale.languageCode]; + String get confirmAddress => localizedValues['confirmAddress'][locale.languageCode]; + String get confirmLocation => localizedValues['confirmLocation'][locale.languageCode]; + String get confirmDeleteMsg => localizedValues['confirmDeleteMsg'][locale.languageCode]; + String get confirmDelete => localizedValues['confirmDelete'][locale.languageCode]; + String get confirmCancellation => localizedValues['confirmCancellation'][locale.languageCode]; + String get serviceInformation => localizedValues['ServiceInformation'][locale.languageCode]; + String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode]; + String get HHCNotAuthMsg => localizedValues['HHCNotAuthMsg'][locale.languageCode]; + String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode]; + String get loginRegister => localizedValues['LoginRegister'][locale.languageCode]; + String get orderLog => localizedValues['OrderLog'][locale.languageCode]; // String get infoLab => localizedValues['info-lab'][locale.languageCode]; // String get infoRadiology => String get orderNumber => localizedValues['orderNumber'][locale.languageCode]; + String get orderDate => localizedValues['orderDate'][locale.languageCode]; + String get itemsNo => localizedValues['itemsNo'][locale.languageCode]; + String get noOrder => localizedValues['noOrder'][locale.languageCode]; + String get noResult => localizedValues['noResult'][locale.languageCode]; String get offersAndPromotions => localizedValues['offersAndPromotions'][locale.languageCode]; + String get review => localizedValues['review'][locale.languageCode]; + String get deliveredOrder => localizedValues['deliveredOrder'][locale.languageCode]; + String get pendingOrder => localizedValues['pendingOrder'][locale.languageCode]; + String get processingOrder => localizedValues['processingOrder'][locale.languageCode]; + String get cancelledOrder => localizedValues['cancelledOrder'][locale.languageCode]; + String get compare => localizedValues['compare'][locale.languageCode]; + String get medicationsRefill => localizedValues['medicationsRefill'][locale.languageCode]; + String get myPrescription => localizedValues['myPrescription'][locale.languageCode]; + String get quantity => localizedValues['quantity'][locale.languageCode]; + String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode]; + String get conditions => localizedValues['conditions'][locale.languageCode]; // pharmacy module String get searchAndScanMedication => localizedValues['searchAndScanMedication'][locale.languageCode]; + String get shopByBrands => localizedValues['shopByBrands'][locale.languageCode]; + String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; + String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; + String get recommended => localizedValues['recommended'][locale.languageCode]; + String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode]; + String get selectAddress => localizedValues['selectAddress'][locale.languageCode]; + String get shippingAddress => localizedValues['shippingAddress'][locale.languageCode]; + String get changeAddress => localizedValues['changeAddress'][locale.languageCode]; + String get selectPaymentOption => localizedValues['selectPaymentOption'][locale.languageCode]; + String get changeMethod => localizedValues['changeMethod'][locale.languageCode]; + String get reviewOrder => localizedValues['reviewOrder'][locale.languageCode]; + String get orderSummary => localizedValues['orderSummary'][locale.languageCode]; + String get active => localizedValues['active'][locale.languageCode]; + String get inactive => localizedValues['inactive'][locale.languageCode]; + String get balance => localizedValues['balance'][locale.languageCode]; + String get gained => localizedValues['gained'][locale.languageCode]; + String get consumed => localizedValues['consumed'][locale.languageCode]; + String get transferred => localizedValues['transferred'][locale.languageCode]; + String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; + String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; + String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode]; + String get acceptLbl => localizedValues['acceptLbl'][locale.languageCode]; String get termsService => localizedValues['TermsService'][locale.languageCode]; + String get beforeUsing => localizedValues['Beforeusing'][locale.languageCode]; + String get accept => localizedValues['accept'][locale.languageCode]; + String get dataSafeInfo => localizedValues['data-safe-info'][locale.languageCode]; + String get dataSafe => localizedValues['data-safe'][locale.languageCode]; + String get informational => localizedValues['informational'][locale.languageCode]; + String get checkDiagnosis => localizedValues['check-diagnosis'][locale.languageCode]; + String get remeberthat => localizedValues['remeberthat'][locale.languageCode]; + String get notUseInEmbergency => localizedValues['not-use-in-emerbency'][locale.languageCode]; + String get notUseInEmbergencyDetails => localizedValues['not-use-in-emerbency-details'][locale.languageCode]; + String get notUseInEmbergencyCall => localizedValues['not-use-in-emerbency-details-call'][locale.languageCode]; + String get selectGender => localizedValues['select-gender'][locale.languageCode]; + String get iAma => localizedValues['i-am-a'][locale.languageCode]; + String get selectAge => localizedValues['select-age'][locale.languageCode]; + String get iAm => localizedValues['i-am'][locale.languageCode]; + String get yearOld => localizedValues['years-old'][locale.languageCode]; + String get categorise => localizedValues['categorise'][locale.languageCode]; + String get cart => localizedValues['cart'][locale.languageCode]; + String get wishList => localizedValues['wishList'][locale.languageCode]; + String get Alhabibapp => localizedValues['Alhabibapp'][locale.languageCode]; + String get searchProductHere => localizedValues['searchProductHere'][locale.languageCode]; + String get email => localizedValues['email'][locale.languageCode]; + String get book => localizedValues['Book'][locale.languageCode]; + String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode]; + String get bloodType => localizedValues['BloodType'][locale.languageCode]; String get loginToUseService => localizedValues['loginToUseService'][locale.languageCode]; + String get maritalStatus => localizedValues['marital-status'][locale.languageCode]; + String get general => localizedValues['general'][locale.languageCode]; + String get profile => localizedValues['profile'][locale.languageCode]; + String get notifications => localizedValues['notifications'][locale.languageCode]; + String get notificationDetails => localizedValues['notificationDetails'][locale.languageCode]; + List get infoMyDoctorPoints => localizedValues['info-my-doctor-points'][locale.languageCode]; + String get infoMyDoctor => localizedValues['info-my-doctor'][locale.languageCode]; + String get infoPrescriptions => localizedValues['info-prescriptions'][locale.languageCode]; + List get infoPrescriptionsPoints => localizedValues['info-my-prescription-points'][locale.languageCode]; String get infoInsuranceCards => localizedValues['info-insurance-cards'][locale.languageCode]; + List get infoInsuranceCardsPoints => localizedValues['info-insurance-cards-points'][locale.languageCode]; String get infoAllergies => localizedValues['info-allergies'][locale.languageCode]; String get sickLeaves => localizedValues['sick-leaves'][locale.languageCode]; + String get infoSickLeaves => localizedValues['info-sick-leaves'][locale.languageCode]; + List get infoSickLeavePoints => localizedValues['info-sick-leave-points'][locale.languageCode]; String get infoApprovals => localizedValues['info-approvals'][locale.languageCode]; + List get infoApprovalPoints => localizedValues['info-approval-points'][locale.languageCode]; String get monthReport => localizedValues['month-report'][locale.languageCode]; + String get infoMonthReport => localizedValues['info-month-report'][locale.languageCode]; + String get languageSetting => localizedValues['language-setting'][locale.languageCode]; + String get alert => localizedValues['alert'][locale.languageCode]; + String get emailAlert => localizedValues['email-alert'][locale.languageCode]; + String get smsAlert => localizedValues['sms-alert'][locale.languageCode]; + String get contactInfo => localizedValues['contact-info'][locale.languageCode]; + String get emergencyName => localizedValues['emrg-name'][locale.languageCode]; + String get emergencyContact => localizedValues['emrg-no'][locale.languageCode]; + String get modes => localizedValues['modes'][locale.languageCode]; + String get vibration => localizedValues['vibration'][locale.languageCode]; + String get blindMode => localizedValues['blind-modes'][locale.languageCode]; + String get invertTheme => localizedValues['invert-theme'][locale.languageCode]; + String get offTheme => localizedValues['off-theme'][locale.languageCode]; + String get dimTheme => localizedValues['dim-theme'][locale.languageCode]; + String get bwTheme => localizedValues['bw-theme'][locale.languageCode]; String get permissions => localizedValues['permissions'][locale.languageCode]; + String get cameraPermission => localizedValues['camera-permission'][locale.languageCode]; + String get locationPermission => localizedValues['location-permission'][locale.languageCode]; + String get accessibility => localizedValues['accessibility'][locale.languageCode]; + String get selectClinic => localizedValues['selectClinic'][locale.languageCode]; String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; + String get findUs => localizedValues['FindUs'][locale.languageCode]; + String get feedback => localizedValues['Feedback'][locale.languageCode]; + String get liveChat => localizedValues['LiveChat'][locale.languageCode]; + String get service => localizedValues['Service'][locale.languageCode]; + String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; + String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; + String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; + String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; + String get sendCopy => localizedValues['SendCopy'][locale.languageCode]; + String get resendOrder => localizedValues['ResendOrder'][locale.languageCode]; + String get ports => localizedValues['Ports'][locale.languageCode]; + String get way => localizedValues['Way'][locale.languageCode]; + String get average => localizedValues['Average'][locale.languageCode]; + String get dailyDoses => localizedValues['DailyDoses'][locale.languageCode]; + String get period => localizedValues['Period'][locale.languageCode]; + String get duration => localizedValues['duration'][locale.languageCode]; + String get cm => localizedValues['cm'][locale.languageCode]; + String get kg => localizedValues['kg'][locale.languageCode]; + String get lb => localizedValues['lb'][locale.languageCode]; + String get birth_date => localizedValues['birth_date'][locale.languageCode]; + String get mass => localizedValues['mass'][locale.languageCode]; + String get tempC => localizedValues['temp-c'][locale.languageCode]; + String get bpm => localizedValues['bpm'][locale.languageCode]; + String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; + String get sysDias => localizedValues['sys-dias'][locale.languageCode]; + String get body => localizedValues['body'][locale.languageCode]; + String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; + String get send => localizedValues['send'][locale.languageCode]; + String get status => localizedValues['status'][locale.languageCode]; + String get likeToHear => localizedValues['like-to-hear'][locale.languageCode]; + String get subject => localizedValues['subject'][locale.languageCode]; + String get message => localizedValues['message'][locale.languageCode]; + String get emptySubject => localizedValues['empty-subject'][locale.languageCode]; + String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; + String get selectAttachment => localizedValues['select-attachment'][locale.languageCode]; + String get complainAppo => localizedValues['complain-appo'][locale.languageCode]; + String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode]; + String get question => localizedValues['question'][locale.languageCode]; + String get messageType => localizedValues['message-type'][locale.languageCode]; + String get compliment => localizedValues['compliment'][locale.languageCode]; + String get suggestion => localizedValues['suggestion'][locale.languageCode]; + String get yourFeedback => localizedValues['your-feedback'][locale.languageCode]; + String get selectPart => localizedValues['select-part'][locale.languageCode]; + String get number => localizedValues['number'][locale.languageCode]; + String get notClassified => localizedValues['not-classified'][locale.languageCode]; + String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; + String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; + String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; + String get bloodDonation => localizedValues['blood-donation'][locale.languageCode]; + String get bloodInstruction => localizedValues['blood-instruction'][locale.languageCode]; + String get bloodTermsNcondition => localizedValues['view-terms'][locale.languageCode]; + String get wantToConnectWithHmgNetwork => localizedValues['wantConnectHmgNetwork'][locale.languageCode]; + String get failedToAccessHmgServices => localizedValues['failedToAccessHmgServices'][locale.languageCode]; + String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode]; + String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; + String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; + String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; + String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + String get value => localizedValues['value'][locale.languageCode]; + String get range => localizedValues['range'][locale.languageCode]; + String get outpatient => localizedValues['out-patient'][locale.languageCode]; + String get inPatient => localizedValues['in-patient'][locale.languageCode]; + String get liveCare => localizedValues['liveCare'][locale.languageCode]; + String get report => localizedValues['report'][locale.languageCode]; + String get openRad => localizedValues['open-rad'][locale.languageCode]; + String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; + String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode]; + String get vaccination => localizedValues['vaccination'][locale.languageCode]; + String get welcomeBackV => localizedValues['welcomeBack'][locale.languageCode]; + String get instructions => localizedValues['instructions'][locale.languageCode]; + String get updateEmail => localizedValues['update-email'][locale.languageCode]; + String get updatedEmail => localizedValues['updated-email'][locale.languageCode]; + String get viewListChildren => localizedValues['view-list-children'][locale.languageCode]; + String get addChild => localizedValues['add-child'][locale.languageCode]; + String get childName => localizedValues['child-name'][locale.languageCode]; + String get childDob => localizedValues['childDob'][locale.languageCode]; + String get deletedChildMes => localizedValues['deleted-child-mes'][locale.languageCode]; + String get visit => localizedValues['visit'][locale.languageCode]; + String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; + String get dueDate => localizedValues['due-date'][locale.languageCode]; + String get validEmail => localizedValues['valid-email'][locale.languageCode]; + String get confirmSend => localizedValues['confirm-send'][locale.languageCode]; + String get emailSuccess => localizedValues['email-success'][locale.languageCode]; + String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; + String get addInstructions => localizedValues['add-instructions'][locale.languageCode]; + String get addedChild => localizedValues['added-child'][locale.languageCode]; + String get appUpdate => localizedValues['appUpdate'][locale.languageCode]; + String get ereferralSaveSuccess => localizedValues['ereferralSaveSuccess'][locale.languageCode]; + String get labResults => localizedValues['labResults'][locale.languageCode]; + String get doctorRating => localizedValues['doctorRating'][locale.languageCode]; + String get good => localizedValues['good'][locale.languageCode]; + String get v_good => localizedValues['v-good'][locale.languageCode]; + String get excellent => localizedValues['excellent'][locale.languageCode]; + String get below_average => localizedValues['below-average'][locale.languageCode]; + String get infoSigns => localizedValues['info-signs'][locale.languageCode]; + String get infoAdvancePayment => localizedValues['info-advance-payment'][locale.languageCode]; + String get infoMyBalance => localizedValues['info-my-balance'][locale.languageCode]; + String get erContant => localizedValues['er-contant'][locale.languageCode]; + String get er => localizedValues['er'][locale.languageCode]; + String get transportationService => localizedValues['transportation-Service'][locale.languageCode]; + String get infoAmbulance => localizedValues['info-ambulance'][locale.languageCode]; + String get transportHeading => localizedValues['RRT-transport-heading'][locale.languageCode]; + String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; + String get toHospital => localizedValues['to-hospital'][locale.languageCode]; + String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; + String get oneDirec => localizedValues['one-direc'][locale.languageCode]; + String get twoDirec => localizedValues['two-direc'][locale.languageCode]; + String get pickupLocation => localizedValues['pickup-location'][locale.languageCode]; + String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode]; + String get insideHome => localizedValues['inside-home'][locale.languageCode]; + String get haveAppo => localizedValues['have-appo'][locale.languageCode]; + String get dropoffLocation => localizedValues['dropoff-location'][locale.languageCode]; + String get selectAll => localizedValues['select-all'][locale.languageCode]; + String get selectMap => localizedValues['select-map'][locale.languageCode]; + String get noAppointment => localizedValues['no-appointment'][locale.languageCode]; + String get patientShareB => localizedValues['patient-share'][locale.languageCode]; + String get patientShareTax => localizedValues['patient-share-tax'][locale.languageCode]; + String get patientShareTotal => localizedValues['patient-share-total'][locale.languageCode]; + String get selectAmbulate => localizedValues['select-ambulate'][locale.languageCode]; + String get wheelchair => localizedValues['wheelchair'][locale.languageCode]; + String get walker => localizedValues['walker'][locale.languageCode]; + String get stretcher => localizedValues['stretcher'][locale.languageCode]; + String get none => localizedValues['none'][locale.languageCode]; + String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode]; + String get billAmount => localizedValues['bill-amount'][locale.languageCode]; + String get transportMethod => localizedValues['transport-method'][locale.languageCode]; + String get directions => localizedValues['directions'][locale.languageCode]; String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; + String get infoTodo => localizedValues['info-todo'][locale.languageCode]; + String get familyInfo => localizedValues['family-info'][locale.languageCode]; + String get profileUpdate => localizedValues['update-succ'][locale.languageCode]; + String get dentalComplaints => localizedValues['dental-complains'][locale.languageCode]; + String get emptyResult => localizedValues['empty-result'][locale.languageCode]; String get noBookedAppo => localizedValues['no-booked-appointment'][locale.languageCode]; + String get noConfirmedAppo => localizedValues['no-confirmed-appointment'][locale.languageCode]; + String get noArrivedAppo => localizedValues['no-arrived-appointment'][locale.languageCode]; + String get upcomingEmpty => localizedValues['upcoming-empty'][locale.languageCode]; + String get upcomingTimeLeft => localizedValues['upcoming-timeLeft'][locale.languageCode]; String get covidTestAllServices => localizedValues['covid-test-all-services'][locale.languageCode]; + String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; + String get ereferral => localizedValues['ereferral'][locale.languageCode]; + String get childVaccine => localizedValues['child-vaccine'][locale.languageCode]; + String get calculators => localizedValues['calculators'][locale.languageCode]; + String get converters => localizedValues['converters'][locale.languageCode]; + String get h2o => localizedValues['h2o'][locale.languageCode]; + String get waterTracker => localizedValues['waterTracker'][locale.languageCode]; + String get ft => localizedValues['ft'][locale.languageCode]; + String get vTour => localizedValues['v-tour'][locale.languageCode]; + String get hmgNews => localizedValues['hmg-news'][locale.languageCode]; + String get bloodD => localizedValues['blood-d'][locale.languageCode]; + String get symptomCheckerTitle => localizedValues['symptomCheckerTitle'][locale.languageCode]; + String get latestNews => localizedValues['latest-news'][locale.languageCode]; + String get ourLocation => localizedValues['our-location'][locale.languageCode]; + String get pharmacies => localizedValues['pharmacies'][locale.languageCode]; + String get hospitals => localizedValues['hospitals'][locale.languageCode]; + String get wallet => localizedValues['wallet'][locale.languageCode]; + String get hmg => localizedValues['hmg'][locale.languageCode]; + String get requested => localizedValues['requested'][locale.languageCode]; + String get ready => localizedValues['ready'][locale.languageCode]; + String get completed => localizedValues['completed'][locale.languageCode]; + String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; + String get insurCards => localizedValues['insur-cards'][locale.languageCode]; + String get labResult => localizedValues['labResult'][locale.languageCode]; + String get details => localizedValues['details'][locale.languageCode]; + String get age => localizedValues['age'][locale.languageCode]; + String get activeInsurence => localizedValues['active-insurence'][locale.languageCode]; + String get notActive => localizedValues['not-active'][locale.languageCode]; + String get cardDetail => localizedValues['card-detail'][locale.languageCode]; + String get dr => localizedValues['Dr'][locale.languageCode]; + String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; + String get instructionsPharmacies => localizedValues['instructions-pharmacies'][locale.languageCode]; + String get selectHospitalDec => localizedValues['select-hospital'][locale.languageCode]; String get start => localizedValues['start'][locale.languageCode]; + String get infoChat => localizedValues['info-chat'][locale.languageCode]; String get noRecords => localizedValues['empty'][locale.languageCode]; + String get lastVisit => localizedValues['last-visit'][locale.languageCode]; + String get tapTitle => localizedValues['tap-title'][locale.languageCode]; + String get later => localizedValues['later'][locale.languageCode]; String get lastAppointment => localizedValues['last-appointment'][locale.languageCode]; + String get rateClinic => localizedValues['rate-clinic'][locale.languageCode]; + String get fetchData => localizedValues['fetch-data'][locale.languageCode]; String get sendConfEmail => localizedValues['send-email'][locale.languageCode]; + String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; + String get theName => localizedValues['thename'][locale.languageCode]; + String get noSearchResult => localizedValues['noSearchResult'][locale.languageCode]; + String get selectFileSouse => localizedValues['selectFileSouse'][locale.languageCode]; + String get rate => localizedValues['rate'][locale.languageCode]; + String get bookedSuccess => localizedValues['booked-success'][locale.languageCode]; + String get appoReminder30 => localizedValues['appo-reminder-select-option-30'][locale.languageCode]; + String get appoReminder60 => localizedValues['appo-reminder-select-option-60'][locale.languageCode]; + String get appoReminder90 => localizedValues['appo-reminder-select-option-90'][locale.languageCode]; + String get appoReminder120 => localizedValues['appo-reminder-select-option-120'][locale.languageCode]; + String get gallery => localizedValues['gallery'][locale.languageCode]; + String get camera => localizedValues['camera'][locale.languageCode]; + String get medReport => localizedValues['med-report'][locale.languageCode]; + String get newMedReport => localizedValues['new-med-report'][locale.languageCode]; + String get requestReport => localizedValues['requestReport'][locale.languageCode]; + String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode]; + String get successSendReport => localizedValues['successSendReport'][locale.languageCode]; + String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode]; + String get systolicLng => localizedValues['systolic-lng'][locale.languageCode]; + String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode]; + String get policyHolder => localizedValues['policy-holder'][locale.languageCode]; + String get policyNo => localizedValues['policy-no'][locale.languageCode]; + String get expiryDateTitle => localizedValues['expiry-date'][locale.languageCode]; + String get classTitle => localizedValues['class'][locale.languageCode]; + String get approval => localizedValues['approval'][locale.languageCode]; + String get agree => localizedValues['agree'][locale.languageCode]; + String get disagree => localizedValues['disagree'][locale.languageCode]; + String get requestSent => localizedValues['request-sent'][locale.languageCode]; + String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode]; + String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode]; + String get scanNow => localizedValues['scan-now'][locale.languageCode]; + String get pharmacyServiceTermsCondition => localizedValues['pharmacyServiceTermsCondition'][locale.languageCode]; String get recordDeleted => localizedValues['recordDeleted'][locale.languageCode]; String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; + String get referralDate => localizedValues['referralDate'][locale.languageCode]; + String get patientName => localizedValues['patientName'][locale.languageCode]; + String get referralNumber => localizedValues['referralNumber'][locale.languageCode]; String get requestID => localizedValues['requestID'][locale.languageCode]; + String get OrderStatus => localizedValues['OrderStatus'][locale.languageCode]; + String get pickupDate => localizedValues['pickupDate'][locale.languageCode]; + String get serviceName => localizedValues['serviceName'][locale.languageCode]; + String get orderLocation => localizedValues['orderLocation'][locale.languageCode]; + String get selectService => localizedValues['selectService'][locale.languageCode]; + String get coveredService => localizedValues['coveredService'][locale.languageCode]; + String get selectedService => localizedValues['selectedService'][locale.languageCode]; + String get cancelOrderMsg => localizedValues['cancelOrderMsg'][locale.languageCode]; + String get processDoneSuccessfully => localizedValues['processDoneSuccessfully'][locale.languageCode]; + String get selectHomeHealthCareServices => localizedValues['selectHomeHealthCareServices'][locale.languageCode]; + String get help => localizedValues['help'][locale.languageCode]; + String get habibRobotText => localizedValues['habibRobotText'][locale.languageCode]; String get topBrands => localizedValues['topBrands'][locale.languageCode]; + String get notifyMe => localizedValues['notifyMe'][locale.languageCode]; + String get specification => localizedValues['specification'][locale.languageCode]; + String get availability => localizedValues['availability'][locale.languageCode]; + String get quantitySize => localizedValues['quantitySize'][locale.languageCode]; + String get addToCart => localizedValues['addToCart'][locale.languageCode]; + String get buyNow => localizedValues['buyNow'][locale.languageCode]; + String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; String get year => localizedValues['Year'][locale.languageCode]; + String get month => localizedValues['Month'][locale.languageCode]; + String get point => localizedValues['point'][locale.languageCode]; + String get riyal => localizedValues['riyal'][locale.languageCode]; + String get termOfService => localizedValues['termOfService'][locale.languageCode]; + String get shoppingCart => localizedValues['shoppingCart'][locale.languageCode]; + String get covidTest => localizedValues['covidTest'][locale.languageCode]; + String get driveThru => localizedValues['driveThru'][locale.languageCode]; + String get NearestErDesc => localizedValues['NearestErDesc'][locale.languageCode]; + String get NearestEr => localizedValues['NearestEr'][locale.languageCode]; + String get infoCMC => localizedValues['infoCMC'][locale.languageCode]; + String get instructionAgree => localizedValues['instructionAgree'][locale.languageCode]; + String get reqId => localizedValues['reqId'][locale.languageCode]; + String get ordersLog => localizedValues['RRT-orders-log'][locale.languageCode]; + String get bloodSugar => localizedValues['blood-sugar'][locale.languageCode]; + String get myTracker => localizedValues['my-tracker'][locale.languageCode]; + String get weekly => localizedValues['weekly'][locale.languageCode]; + String get monthlyT => localizedValues['monthly'][locale.languageCode]; + String get yearly => localizedValues['yearly'][locale.languageCode]; + String get measured => localizedValues['measured'][locale.languageCode]; + String get sugarAdd => localizedValues['sugar-add'][locale.languageCode]; + String get other => localizedValues['other'][locale.languageCode]; + String get measureUnit => localizedValues['measure-unit'][locale.languageCode]; + String get measureTime => localizedValues['measure-time'][locale.languageCode]; + String get update => localizedValues['update'][locale.languageCode]; + String get covid19_driveThrueTest => localizedValues['covid19_driveThrueTest'][locale.languageCode]; + String get eReferral => localizedValues['E-Referral'][locale.languageCode]; String get msg_email_address_up_to_date => localizedValues["msg_email_address_up_to_date"][locale.languageCode]; + String get updateEmailMsg => localizedValues["update-email-msg"][locale.languageCode]; String get addNewChild => localizedValues["add-new-child"][locale.languageCode]; + String get sendChildEmailMsg => localizedValues["send-child-email-msg"][locale.languageCode]; + String get vaccinationAddChildMsg => localizedValues["vaccination-add-child-msg"][locale.languageCode]; + String get childAddedSuccessfully => localizedValues["child_added_successfully"][locale.languageCode]; String get sugar => localizedValues["sugar"][locale.languageCode]; + String get bloodCholesterol => localizedValues["bloodCholesterol"][locale.languageCode]; + String get cholesterol => localizedValues["cholesterol"][locale.languageCode]; + String get triglycerides => localizedValues["triglycerides"][locale.languageCode]; + String get fatInBlood => localizedValues["fatInBlood"][locale.languageCode]; + String get calculate => localizedValues["calculate"][locale.languageCode]; + String get enterReadingValue => localizedValues["enterReadingValue"][locale.languageCode]; + String get convertBloodSugarStatement => localizedValues["convertBloodSugarStatement"][locale.languageCode]; + String get convertFrom => localizedValues["convertFrom"][locale.languageCode]; + String get result => localizedValues["result"][locale.languageCode]; + String get sort => localizedValues["sort"][locale.languageCode]; + String get bloodSugarConversion => localizedValues["bloodSugarConversion"][locale.languageCode]; + String get convertCholesterolStatement => localizedValues["convertCholesterolStatement"][locale.languageCode]; + String get triglyceridesConvertStatement => localizedValues["triglyceridesConvertStatement"][locale.languageCode]; + String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode]; + String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode]; + String get generalHealth => localizedValues["generalHealth"][locale.languageCode]; + String get womanHealth => localizedValues["womanHealth"][locale.languageCode]; + String get bmi => localizedValues["bmi"][locale.languageCode]; + String get calcHealth => localizedValues["calc-health"][locale.languageCode]; + String get calories => localizedValues["calories"][locale.languageCode]; + String get bmr => localizedValues["bmr"][locale.languageCode]; + String get idealBody => localizedValues["idealBody"][locale.languageCode]; + String get bodyWord => localizedValues["body_word"][locale.languageCode]; + String get fat => localizedValues["fat"][locale.languageCode]; + String get carbohydrate => localizedValues["carbohydrate"][locale.languageCode]; + String get proteinFat => localizedValues["proteinFat"][locale.languageCode]; + String get ovulation => localizedValues["ovulation"][locale.languageCode]; + String get delivery => localizedValues["delivery"][locale.languageCode]; + String get bmiCalcDesc => localizedValues["bmiCalcDesc"][locale.languageCode]; + String get selectUnit => localizedValues["selectUnit"][locale.languageCode]; + String get feet => localizedValues["feet"][locale.languageCode]; + String get pound => localizedValues["pound"][locale.languageCode]; + String get seeListOfDoctor => localizedValues["seeListOfDoctor"][locale.languageCode]; + String get obese => localizedValues["obese"][locale.languageCode]; + String get overWeight => localizedValues["overWeight"][locale.languageCode]; + String get healthy => localizedValues["healthy"][locale.languageCode]; + String get underWeight => localizedValues["underWeight"][locale.languageCode]; + String get bmiCalcMsgObese => localizedValues["bmiCalcMsgObese"][locale.languageCode]; + String get bmiCalcMsgOverweight => localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; + String get bmiCalcMsgHealthy => localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; + String get bmiCalcMsgUnderWeight => localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; + String get bariatrics => localizedValues["bariatrics"][locale.languageCode]; + String get bariatricsHeaderMsg => localizedValues["bariatricsHeaderMsg"][locale.languageCode]; + String get continues => localizedValues["continue"][locale.languageCode]; + String get skip => localizedValues["skip"][locale.languageCode]; + String get calorieCalcDesc => localizedValues["calorieCalcDesc"][locale.languageCode]; + String get age11_120Years => localizedValues["age11_120_years"][locale.languageCode]; + String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode]; + String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; + String get weightAdd => localizedValues["weight-add"][locale.languageCode]; + String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; + String get diastolicAdd => localizedValues["diastolic-add"][locale.languageCode]; + String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode]; + String get selectLocation => localizedValues["select-location"][locale.languageCode]; + String get resultHeader => localizedValues["result-header"][locale.languageCode]; + String get covidInfo => localizedValues["covid-info"][locale.languageCode]; + String get selectAppo => localizedValues["select-appo"][locale.languageCode]; + String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode]; + String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode]; + String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode]; + String get back => localizedValues["back"][locale.languageCode]; + String get getDirections => localizedValues["get-directions"][locale.languageCode]; + String get selectedLocation => localizedValues["selected-location"][locale.languageCode]; + String get testFee => localizedValues["test-fee"][locale.languageCode]; + String get payOptions => localizedValues["pay-options"][locale.languageCode]; + String get livecareService => localizedValues["livecare-service"][locale.languageCode]; + String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode]; + String get whyLivecare => localizedValues["why-livecare"][locale.languageCode]; + String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode]; + String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; + String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; + String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode]; String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode]; + String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode]; + String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode]; + String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode]; String get today => localizedValues["today"][locale.languageCode]; + String get week => localizedValues["week"][locale.languageCode]; + String get h2oAmountOfWater => localizedValues["h2o-amount-of-water"][locale.languageCode]; + String get updateUser => localizedValues["update-user"][locale.languageCode]; + String get editname => localizedValues["editname"][locale.languageCode]; + String get activityLevel => localizedValues["activity-level"][locale.languageCode]; + String get success => localizedValues["success"][locale.languageCode]; + String get enterNameHere => localizedValues["enterNameHere"][locale.languageCode]; + String get lightActive => localizedValues["light-active"][locale.languageCode]; + String get modActive => localizedValues["mod-active"][locale.languageCode]; + String get reminderLabel => localizedValues["reminder-label"][locale.languageCode]; + String get reminderTimesLabel => localizedValues["reminder-times-label"][locale.languageCode]; + String get times => localizedValues["times"][locale.languageCode]; + String get WaterCalculate => localizedValues["WaterCalculate"][locale.languageCode]; + String get notifTitle => localizedValues["notif-title"][locale.languageCode]; + String get notifText => localizedValues["notif-text"][locale.languageCode]; + String get custom => localizedValues["custom"][locale.languageCode]; + String get undo => localizedValues["undo"][locale.languageCode]; + String get drinking => localizedValues["drinking"][locale.languageCode]; + String get remaining => localizedValues["remaining"][locale.languageCode]; + String get taken => localizedValues["taken"][locale.languageCode]; + String get ml => localizedValues["ml"][locale.languageCode]; + String get l => localizedValues["l"][locale.languageCode]; + String get customLabel => localizedValues["custom-label"][locale.languageCode]; String get customLabelInLitres => localizedValues["custom-label-in-litres"][locale.languageCode]; + String get customLabelInMililitres => localizedValues["custom-label-in-mililitres"][locale.languageCode]; + String get amount_ => localizedValues["amount"][locale.languageCode]; + String get targetReach => localizedValues["target-reach"][locale.languageCode]; + String get weekHeader => localizedValues["week-header"][locale.languageCode]; + String get monthHeader => localizedValues["month-header"][locale.languageCode]; + String get notifPermissionTitle => localizedValues["notif-permission-title"][locale.languageCode]; + String get notifPermissionMsg => localizedValues["notif-permission-msg"][locale.languageCode]; + String get verification_message_code => localizedValues["verification_message_code"][locale.languageCode]; + String get sms_code => localizedValues["sms_code"][locale.languageCode]; + String get code_failure => localizedValues["code_failure"][locale.languageCode]; + String get resend => localizedValues["resend"][locale.languageCode]; + String get submitncontinue => localizedValues["submitncontinue"][locale.languageCode]; + String get areyousure => localizedValues["areyousure"][locale.languageCode]; // Offer And Packahes String get subT => localizedValues['OffersAndPackages'][locale.languageCode]; + String get totalWithColonRight => localizedValues['totalWithColonRight'][locale.languageCode]; String get preferredunit => localizedValues["preferredunit"][locale.languageCode]; + String get trySaying => localizedValues["try-saying"][locale.languageCode]; + String get enterIdentificationNumber => localizedValues["enterIdentificationNumber"][locale.languageCode]; + String get accountActivationDesc => localizedValues["accountActivationDesc"][locale.languageCode]; + String get pointsToTransfer => localizedValues["pointsToTransfer"][locale.languageCode]; + String get enterBeneficiaryAccountNo => localizedValues["enterBeneficiaryAccountNo"][locale.languageCode]; + String get confirmPrescription => localizedValues["confirm-prescription"][locale.languageCode]; + String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode]; + String get orderOverview => localizedValues["order-overview"][locale.languageCode]; + String get shippingAddresss => localizedValues["shipping-address"][locale.languageCode]; + String get covidAlert => localizedValues["covid-alert"][locale.languageCode]; + String get pharmacyRelogin => localizedValues["pharmacy-relogin"][locale.languageCode]; + String get onlineCheckInAgreement => localizedValues["onlineCheckInAgreement"][locale.languageCode]; + String get chiefComplaints => localizedValues["chiefComplaints"][locale.languageCode]; + String get errorChiefComplaints => localizedValues["errorChiefComplaints"][locale.languageCode]; + String get expectedArrivalTime => localizedValues["expectedArrivalTime"][locale.languageCode]; + String get errorExpectedArrivalTime => localizedValues["errorExpectedArrivalTimes"][locale.languageCode]; + String get anicllaryOrders => localizedValues["ancillary-orders"][locale.languageCode]; + String get mrn => localizedValues["MRN"][locale.languageCode]; + String get appointmentDate => localizedValues["appointment-date"][locale.languageCode]; + String get appointmentNo => localizedValues["appointment-no"][locale.languageCode]; + String get insuranceID => localizedValues["insurance-id"][locale.languageCode]; + String get enterFile => localizedValues["enter-file"][locale.languageCode]; + String get enterReferralRequesterName => localizedValues["enterReferralRequesterName"][locale.languageCode]; + String get selectRelationship => localizedValues["selectRelationship"][locale.languageCode]; + String get requesterRelationship => localizedValues["requesterRelationship"][locale.languageCode]; + String get newReferral => localizedValues["newReferral"][locale.languageCode]; + String get searchForReferrals => localizedValues["searchForReferrals"][locale.languageCode]; } diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 2be9ac84..17b92bbb 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -61,10 +61,8 @@ class Utils { /// Check The Internet Connection static Future checkConnection() async { - ConnectivityResult connectivityResult = - await (Connectivity().checkConnectivity()); - if ((connectivityResult == ConnectivityResult.mobile) || - (connectivityResult == ConnectivityResult.wifi)) { + ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity()); + if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) { return true; } else { return false; @@ -128,19 +126,11 @@ class Utils { } static String getAppointmentTransID(int projectID, int clinicID, int appoNo) { - return projectID.toString() + - '-' + - clinicID.toString() + - '-' + - appoNo.toString(); + return projectID.toString() + '-' + clinicID.toString() + '-' + appoNo.toString(); } static String getAdvancePaymentTransID(int projectID, int fileNumber) { - return projectID.toString() + - '-' + - fileNumber.toString() + - '-' + - DateTime.now().millisecondsSinceEpoch.toString(); + return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString(); } bool validateIDBox(String value, type) { @@ -198,53 +188,49 @@ class Utils { } static validEmail(email) { - return RegExp( - r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+") - .hasMatch(email); + return RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email); } - static List myMedicalList( - {ProjectViewModel projectViewModel, - BuildContext context, - bool isLogin, - count}) { + static List myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) { List medical = List(); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(5) - ? Navigator.push(context, FadePage(page: MyAppointments())) - : null, + onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null, child: isLogin ? Stack(children: [ - MedicalProfileItem( - title: TranslationBase.of(context).myAppointments, - imagePath: 'my_appointment_icon.png', - subTitle: TranslationBase.of(context).myAppointmentsList, - hasBadge: true, - isEnable: projectViewModel.havePrivilege(5)), - Positioned( - right: 0.0, - child: Badge( - toAnimate: false, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, - badgeColor: secondaryColor.withOpacity(1.0), - borderRadius: BorderRadius.circular(8), - badgeContent: Container( - padding: EdgeInsets.all(2.0), - child: Text(count.toString(), - style: TextStyle(color: Colors.white, fontSize: 16.0)), - ), - ), - ), - ]) + Container( + width: double.infinity, + height: double.infinity, + child: MedicalProfileItem( + title: TranslationBase.of(context).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel.havePrivilege(5)), + ), + Positioned( + right: 8, + top: 4, + child: Badge( + toAnimate: false, + position: BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: secondaryColor.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontSize: 16.0)), + ), + ), + ), + ]) : MedicalProfileItem( - title: TranslationBase.of(context).myAppointments, - imagePath: 'my_appointment_icon.png', - subTitle: TranslationBase.of(context).myAppointmentsList, - hasBadge: true, - isEnable: projectViewModel.havePrivilege(5), - ), + title: TranslationBase.of(context).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel.havePrivilege(5), + ), )); if (projectViewModel.havePrivilege(10)) { @@ -252,31 +238,27 @@ class Utils { onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())), child: MedicalProfileItem( title: TranslationBase.of(context).lab, - imagePath: 'lab_result_icon.png', + imagePath: 'lab_result.svg', subTitle: TranslationBase.of(context).labSubtitle, ), )); } medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(7) - ? Navigator.push(context, FadePage(page: RadiologyHomePage())) - : null, + onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).radiology, - imagePath: 'radiology_icon.png', + imagePath: 'radiology.svg', subTitle: TranslationBase.of(context).radiologySubtitle, isEnable: projectViewModel.havePrivilege(7), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(12) - ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).medicines, - imagePath: 'prescription_icon.png', + imagePath: 'medicine_prescription.svg', subTitle: TranslationBase.of(context).medicinesSubtitle, isEnable: projectViewModel.havePrivilege(12), ), @@ -285,25 +267,23 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(25) ? Navigator.push( - context, - FadePage(page: VitalSignDetailsScreen()), - ) + context, + FadePage(page: VitalSignDetailsScreen()), + ) : null, child: MedicalProfileItem( title: TranslationBase.of(context).vitalSigns, - imagePath: 'vital_signs.png', + imagePath: 'vital_signs.svg', subTitle: TranslationBase.of(context).vitalSignsSubtitle, isEnable: projectViewModel.havePrivilege(25), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(48) - ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myMedical, - imagePath: 'active_medications.png', + imagePath: 'active_medication.svg', subTitle: TranslationBase.of(context).myMedicalSubtitle, isEnable: false, ), @@ -312,38 +292,31 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(6) ? Navigator.push( - context, - FadePage( - page: DoctorHomePage(), - ), - ) + context, + FadePage( + page: DoctorHomePage(), + ), + ) : null, - child: MedicalProfileItem( - title: TranslationBase.of(context).myDoctor, - imagePath: 'doctor_icon.png', - subTitle: TranslationBase.of(context).myDoctorSubtitle, - isEnable: projectViewModel.havePrivilege(6)), + child: + MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(14) - ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).eye, - imagePath: 'eye_measurement_icon.png', + imagePath: 'eye_measurement.svg', subTitle: TranslationBase.of(context).eyeSubtitle, isEnable: projectViewModel.havePrivilege(14), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(22) - ? Navigator.push(context, FadePage(page: InsuranceCard())) - : null, + onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).insurance, - imagePath: 'insurance_card_icon.png', + imagePath: 'insurance_card.svg', subTitle: TranslationBase.of(context).insuranceSubtitle, isEnable: projectViewModel.havePrivilege(22), ), @@ -355,90 +328,76 @@ class Utils { }, child: MedicalProfileItem( title: TranslationBase.of(context).updateInsurance, - imagePath: 'insurance_update_icon_.png', + imagePath: 'insurance_card.svg', subTitle: TranslationBase.of(context).updateInsuranceSubtitle, ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(18) - ? Navigator.push(context, FadePage(page: InsuranceApproval())) - : null, + onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).insuranceApproval, - imagePath: 'insurance_approvals_icon.png', + imagePath: 'insurance_approval.svg', subTitle: TranslationBase.of(context).insuranceApprovalSubtitle, isEnable: projectViewModel.havePrivilege(18), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(23) - ? Navigator.push(context, FadePage(page: AllergiesPage())) - : null, + onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).allergies, - imagePath: 'my_allergies_icon.png', + imagePath: 'allergies_diagnosed.svg', subTitle: TranslationBase.of(context).allergiesSubtitle, isEnable: projectViewModel.havePrivilege(23), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(26) - ? Navigator.push(context, FadePage(page: MyVaccines())) - : null, + onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myVaccines, - imagePath: 'my_vaccines_icon.png', + imagePath: 'vaccine_list.svg', subTitle: TranslationBase.of(context).myVaccinesSubtitle, isEnable: projectViewModel.havePrivilege(26), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(20) - ? Navigator.push(context, FadePage(page: HomeReportPage())) - : null, + onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).medical, - imagePath: 'medical_reports_icon.png', + imagePath: 'medical_report.svg', subTitle: TranslationBase.of(context).medicalSubtitle, isEnable: projectViewModel.havePrivilege(20), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(19) - ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).monthly, - imagePath: 'monthly_reports_icon.png', + imagePath: 'monthly_report.svg', subTitle: TranslationBase.of(context).monthlySubtitle, isEnable: projectViewModel.havePrivilege(19), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(16) - ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) - : null, + onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).sick, - imagePath: 'sick_leaves_icons.png', + imagePath: 'sick_leave.svg', subTitle: TranslationBase.of(context).sickSubtitle, isEnable: projectViewModel.havePrivilege(16), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(47) - ? Navigator.push(context, FadePage(page: MyBalancePage())) - : null, + onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myBalance, - imagePath: 'check-in.png', + imagePath: 'balance_credit.svg', subTitle: TranslationBase.of(context).myBalanceSubtitle, isEnable: projectViewModel.havePrivilege(47), ), @@ -452,38 +411,29 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(24) - ? Navigator.push(context, FadePage(page: MyTrackers())) - : null, + onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myTrackers, - imagePath: 'my_tracker_icon.png', + imagePath: 'tracker.svg', subTitle: TranslationBase.of(context).myTrackersSubtitle, isEnable: projectViewModel.havePrivilege(24), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(30) - ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) - : null, + onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).smartWatches, - imagePath: 'smartwatch_icon.png', + imagePath: 'smart_watch.svg', subTitle: TranslationBase.of(context).smartWatchesSubtitle, isEnable: projectViewModel.havePrivilege(30), ), )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(28) - ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) - : null, + onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).askYour, - imagePath: 'ask_doctor_icon.png', - subTitle: TranslationBase.of(context).askYourSubtitle, - isEnable: projectViewModel.havePrivilege(28)), + title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)), )); if (projectViewModel.havePrivilege(32) || true) { @@ -493,15 +443,11 @@ class Utils { if (projectViewModel.isLogin && userData_ != null) { String patientID = userData_.patientID.toString(); GifLoaderDialogUtils.showMyDialog(context); - projectViewModel - .platformBridge() - .connectHMGInternetWifi(patientID) - .then((value) => {GifLoaderDialogUtils.hideDialog(context)}); + projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}); } else { AlertDialogBox( context: context, - confirmMessage: - "Please login with your account first to use this feature", + confirmMessage: "Please login with your account first to use this feature", okText: "OK", okFunction: () { AlertDialogBox.closeAlertDialog(context); @@ -511,19 +457,17 @@ class Utils { }, child: MedicalProfileItem( title: TranslationBase.of(context).internet, - imagePath: 'insurance_card_icon.png', + imagePath: 'internet_connection.svg', subTitle: TranslationBase.of(context).internetSubtitle, ), )); } medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(40) - ? launch('whatsapp://send?phone=18885521858&text=') - : null, + onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null, child: MedicalProfileItem( title: TranslationBase.of(context).chatbot, - imagePath: 'insurance_approvals_icon.png', + imagePath: 'chatbot.svg', subTitle: TranslationBase.of(context).chatbotSubtitle, isEnable: projectViewModel.havePrivilege(40), ), @@ -532,51 +476,60 @@ class Utils { return medical; } - - static List myMedicalListHomePage( - {ProjectViewModel projectViewModel, - BuildContext context, - bool isLogin, - count}) { + static List myMedicalListHomePage({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) { List medical = List(); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(5) - ? Navigator.push(context, FadePage(page: MyAppointments())) - : null, + onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null, child: isLogin ? Stack(children: [ - MedicalProfileItem( - title: TranslationBase.of(context).myAppointments, - imagePath: 'appointment_list.svg', - subTitle: TranslationBase.of(context).myAppointmentsList, - hasBadge: true, - isEnable: projectViewModel.havePrivilege(5)), - Positioned( - right: 8, - top: 4, - child: Badge( - toAnimate: false, - elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, - badgeColor: secondaryColor.withOpacity(1.0), - borderRadius: BorderRadius.circular(8), - badgeContent: Container( - padding: EdgeInsets.all(2.0), - child: Text(count.toString(), - style: TextStyle(color: Colors.white, fontWeight:FontWeight.bold,fontSize: 12.0)), - ), - ), - ), - ]) + MedicalProfileItem( + title: TranslationBase.of(context).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel.havePrivilege(5)), + projectViewModel.isArabic + ? Positioned( + left: 8, + top: 4, + child: Badge( + toAnimate: false, + elevation: 0, + position: BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: secondaryColor.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + : Positioned( + right: 8, + top: 4, + child: Badge( + toAnimate: false, + elevation: 0, + position: BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: secondaryColor.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ), + ]) : MedicalProfileItem( - title: TranslationBase.of(context).myAppointments, - imagePath: 'appointment_list.svg', - subTitle: TranslationBase.of(context).myAppointmentsList, - hasBadge: true, - isEnable: projectViewModel.havePrivilege(5), - ), + title: TranslationBase.of(context).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel.havePrivilege(5), + ), )); if (projectViewModel.havePrivilege(10)) { @@ -591,9 +544,7 @@ class Utils { } medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(7) - ? Navigator.push(context, FadePage(page: RadiologyHomePage())) - : null, + onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).radiology, imagePath: 'radiology.svg', @@ -605,24 +556,18 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(6) ? Navigator.push( - context, - FadePage( - page: DoctorHomePage(), - ), - ) + context, + FadePage( + page: DoctorHomePage(), + ), + ) : null, - child: MedicalProfileItem( - title: TranslationBase.of(context).myDoctor, - imagePath: 'my_doc.svg', - subTitle: TranslationBase.of(context).myDoctorSubtitle, - isEnable: projectViewModel.havePrivilege(6)), + child: + MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), )); - medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(12) - ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).medicines, imagePath: 'prescription_icon.png', @@ -634,9 +579,9 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(25) ? Navigator.push( - context, - FadePage(page: VitalSignDetailsScreen()), - ) + context, + FadePage(page: VitalSignDetailsScreen()), + ) : null, child: MedicalProfileItem( title: TranslationBase.of(context).vitalSigns, @@ -647,9 +592,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(48) - ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myMedical, imagePath: 'active_medications.png', @@ -658,12 +601,8 @@ class Utils { ), )); - - medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(14) - ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).eye, imagePath: 'eye_measurement_icon.png', @@ -673,9 +612,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(22) - ? Navigator.push(context, FadePage(page: InsuranceCard())) - : null, + onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).insurance, imagePath: 'insurance_card_icon.png', @@ -696,9 +633,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(18) - ? Navigator.push(context, FadePage(page: InsuranceApproval())) - : null, + onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).insuranceApproval, imagePath: 'insurance_approvals_icon.png', @@ -708,9 +643,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(23) - ? Navigator.push(context, FadePage(page: AllergiesPage())) - : null, + onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).allergies, imagePath: 'my_allergies_icon.png', @@ -720,9 +653,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(26) - ? Navigator.push(context, FadePage(page: MyVaccines())) - : null, + onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myVaccines, imagePath: 'my_vaccines_icon.png', @@ -732,9 +663,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(20) - ? Navigator.push(context, FadePage(page: HomeReportPage())) - : null, + onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).medical, imagePath: 'medical_reports_icon.png', @@ -744,9 +673,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(19) - ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) - : null, + onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).monthly, imagePath: 'monthly_reports_icon.png', @@ -756,9 +683,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(16) - ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) - : null, + onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).sick, imagePath: 'sick_leaves_icons.png', @@ -768,9 +693,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(47) - ? Navigator.push(context, FadePage(page: MyBalancePage())) - : null, + onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myBalance, imagePath: 'check-in.png', @@ -787,9 +710,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(24) - ? Navigator.push(context, FadePage(page: MyTrackers())) - : null, + onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myTrackers, imagePath: 'my_tracker_icon.png', @@ -799,9 +720,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(30) - ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) - : null, + onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).smartWatches, imagePath: 'smartwatch_icon.png', @@ -811,14 +730,9 @@ class Utils { )); medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(28) - ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) - : null, + onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).askYour, - imagePath: 'ask_doctor_icon.png', - subTitle: TranslationBase.of(context).askYourSubtitle, - isEnable: projectViewModel.havePrivilege(28)), + title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)), )); if (projectViewModel.havePrivilege(32) || true) { @@ -828,15 +742,11 @@ class Utils { if (projectViewModel.isLogin && userData_ != null) { String patientID = userData_.patientID.toString(); GifLoaderDialogUtils.showMyDialog(context); - projectViewModel - .platformBridge() - .connectHMGInternetWifi(patientID) - .then((value) => {GifLoaderDialogUtils.hideDialog(context)}); + projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}); } else { AlertDialogBox( context: context, - confirmMessage: - "Please login with your account first to use this feature", + confirmMessage: "Please login with your account first to use this feature", okText: "OK", okFunction: () { AlertDialogBox.closeAlertDialog(context); @@ -853,9 +763,7 @@ class Utils { } medical.add(InkWell( - onTap: () => projectViewModel.havePrivilege(40) - ? launch('whatsapp://send?phone=18885521858&text=') - : null, + onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null, child: MedicalProfileItem( title: TranslationBase.of(context).chatbot, imagePath: 'insurance_approvals_icon.png', @@ -867,14 +775,12 @@ class Utils { return medical; } - static Widget loadNetworkImage( - {@required String url, BoxFit fitting = BoxFit.cover}) { + static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}) { return CachedNetworkImage( placeholderFadeInDuration: Duration(milliseconds: 250), fit: fitting, imageUrl: url, - placeholder: (context, url) => - Container(child: Center(child: CircularProgressIndicator())), + placeholder: (context, url) => Container(child: Center(child: CircularProgressIndicator())), errorWidget: (context, url, error) { return Icon( Icons.error, @@ -885,13 +791,7 @@ class Utils { } } -Widget applyShadow( - {Color color = Colors.grey, - double shadowOpacity = 0.5, - double spreadRadius = 2, - double blurRadius = 7, - Offset offset = const Offset(2, 2), - @required Widget child}) { +Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) { return Container( decoration: BoxDecoration( boxShadow: [ @@ -908,8 +808,7 @@ Widget applyShadow( } Future userData() async { - var userData = AuthenticatedUser.fromJson( - await AppSharedPreferences().getObject(MAIN_USER)); + var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER)); return userData; } @@ -923,12 +822,9 @@ extension IndexedIterable on Iterable { openAppStore({String androidPackageName, String iOSAppID}) async { if (Platform.isAndroid) { - assert(!(androidPackageName == null), - "Should have valid value in androidPackageName parameter"); - if ((await FlutterHmsGmsAvailability.isGmsAvailable)) - launch("market://details?id=com.ejada.hmg"); - if ((await FlutterHmsGmsAvailability.isHmsAvailable)) - launch("appmarket://details?id=com.ejada.hmg"); + assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter"); + if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg"); + if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg"); } else if (Platform.isIOS) { assert((iOSAppID == null), "Should have valid value in iOSAppID parameter"); launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)"); diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 1dd4e76a..06ef517a 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -88,11 +88,19 @@ InputDecoration txtFieldSearch(String label) { ); } -Widget circularAviator(double s, {Color bcColor, Color brColor, Color iconColor, int borderWidth, IconData icon}) { +Widget circularAviator( + double s, { + Color bcColor, + Color brColor, + Color iconColor, + int borderWidth, + IconData icon, + double elevation = 4, +}) { return Card( shape: cardRadius(2000), color: Colors.transparent, - elevation: 4, + elevation: elevation, child: Container( width: s, height: s, @@ -206,13 +214,27 @@ Decoration containerBottomRightRadiusWithGradient(double radius, {Color darkColo ); } +Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color darkColor, Color lightColor}) { + return BoxDecoration( + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius)), + gradient: LinearGradient( + colors: [ + lightColor == null ? Color(0xFFF71787E) : lightColor, + darkColor == null ? Color(0xFFF2B353E) : darkColor, + ], + begin: Alignment.topCenter, + end: Alignment.bottomRight, + ), + ); +} + Decoration containerRadiusWithGradientServices(double radius, {Color darkColor, Color lightColor}) { return BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(radius)), gradient: LinearGradient( colors: [ - darkColor == null ? Color(0xFFF2B353E) : darkColor, - lightColor == null ? Color(0xFFF71787E) : lightColor, + darkColor == null ? Color(0xFF2B353E) : darkColor, + lightColor == null ? Color(0xFF71787E) : lightColor, ], begin: Alignment.centerRight, end: Alignment.topLeft, @@ -220,6 +242,24 @@ Decoration containerRadiusWithGradientServices(double radius, {Color darkColor, ); } +Decoration containerBottomRightRadiusWithGradientBorder(double radius, {Color darkColor, Color lightColor, Color borderColor = Colors.transparent, double w = 0}) { + return BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(radius)), + border: Border.all( + width: w, // + color: borderColor // <--- border width here + ), + gradient: LinearGradient( + colors: [ + darkColor == null ? Color(0xFFF2B353E) : darkColor, + lightColor == null ? Color(0xFFF71787E) : lightColor, + ], + begin: Alignment.topCenter, + end: Alignment.bottomRight, + ), + ); +} + Decoration containerRadius(Color background, double radius) { return BoxDecoration( color: background, @@ -260,6 +300,13 @@ Decoration containerColorRadiusRight(Color background, double radius) { ); } +Decoration containerColorRadiusLeft(Color background, double radius) { + return BoxDecoration( + color: background, + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), + ); +} + Decoration containerColorRadiusRightBorder(Color background, double radius, double w) { return BoxDecoration( color: background, diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index b24e312c..a77ab937 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -28,7 +28,7 @@ class MedicalProfileItem extends StatelessWidget { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); + //ProjectViewModel projectViewModel = Provider.of(context); return Container( height: MediaQuery.of(context).size.height * 0.143, width: MediaQuery.of(context).size.height * 0.143, @@ -60,7 +60,7 @@ class MedicalProfileItem extends StatelessWidget { Text( title, style: TextStyle( - fontSize: 14, + fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.bold, ), ), @@ -73,7 +73,7 @@ class MedicalProfileItem extends StatelessWidget { subTitle, maxLines: 1, style: TextStyle( - fontSize: 14, + fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.bold, ), ), diff --git a/lib/widgets/data_display/medical/time_line_new_widget.dart b/lib/widgets/data_display/medical/time_line_new_widget.dart new file mode 100644 index 00000000..d13d5d24 --- /dev/null +++ b/lib/widgets/data_display/medical/time_line_new_widget.dart @@ -0,0 +1,167 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class TimeLineView extends StatefulWidget { + bool isLogged, isArabic; + List appoitmentAllHistoryResultList; + + TimeLineView(this.isLogged, this.isArabic, this.appoitmentAllHistoryResultList); + + @override + _TimeLineViewState createState() => _TimeLineViewState(); +} + +class _TimeLineViewState extends State { + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + height: 210, + decoration: containerBottomRightRadiusWithGradientBorder(0, darkColor: Color(0xFFF2B353E), lightColor: Color(0xFFF2B353E)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Appointments", + style: TextStyle( + color: CustomColors.white, + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + Text( + "Timeline", + style: TextStyle( + color: CustomColors.white, + fontSize: 24, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ], + ), + ListView.builder( + itemBuilder: (context, index) => TimelineNewWidget( + // isUp: index % 2 == 1, + appoitmentAllHistoryResul: widget.appoitmentAllHistoryResultList[index], + ), + itemCount: widget.appoitmentAllHistoryResultList.length, + scrollDirection: Axis.horizontal, + shrinkWrap: true, + reverse: widget.isArabic, + ), + ], + ), + ); + } +} + +class TimelineNewWidget extends StatelessWidget { + final AppoitmentAllHistoryResultList appoitmentAllHistoryResul; + + TimelineNewWidget({Key key, this.appoitmentAllHistoryResul}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + width: MediaQuery.of(context).size.width / 1.6, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + child: Row( + children: [ + Text( + DateUtil.getDayMonthYearLangDateFormatted( + DateUtil.convertStringToDate(appoitmentAllHistoryResul.appointmentDate), + projectViewModel.isArabic ? "ar" : "en", + ), + style: TextStyle( + color: CustomColors.grey2, + ), + ), + barView(), + ], + ), + ), + mHeight(10), + LargeAvatar( + onTap: () { + //AppointmentDetails + // Navigator.push( + // context, + // FadePage( + // page: AppointmentDetails( + // appo: appoitmentAllHistoryResul, + // ))); + }, + name: appoitmentAllHistoryResul.doctorNameObj, + url: appoitmentAllHistoryResul.doctorImageURL, + width: 30, + height: 30, + ), + mHeight(6), + Text( + appoitmentAllHistoryResul.doctorNameObj, + style: TextStyle( + color: CustomColors.white, + fontSize: 14, + ), + ), + Text( + appoitmentAllHistoryResul.clinicName, + style: TextStyle( + color: CustomColors.grey2, + fontSize: 10, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ); + } + + Widget barView() { + return Flexible( + child: Container( + width: double.infinity, + child: Row( + children: [ + Container( + width: 6, + height: 6, + decoration: containerColorRadiusBorderWidth(CustomColors.pharmacyGreyColor, 50, CustomColors.grey2, 1), + ), + Expanded( + child: Container( + width: double.infinity, + height: 1, + color: CustomColors.grey2, + ), + ), + Container( + width: 6, + height: 6, + decoration: containerColorRadiusBorderWidth(CustomColors.pharmacyGreyColor, 50, CustomColors.grey2, 1), + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/others/floating_button_search.dart b/lib/widgets/others/floating_button_search.dart index 4310996b..d8ca7a92 100644 --- a/lib/widgets/others/floating_button_search.dart +++ b/lib/widgets/others/floating_button_search.dart @@ -38,6 +38,7 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart' import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; @@ -74,8 +75,7 @@ class FloatingSearchButton extends StatefulWidget { _FloatingSearchButton createState() => _FloatingSearchButton(); } -class _FloatingSearchButton extends State - with TickerProviderStateMixin { +class _FloatingSearchButton extends State with TickerProviderStateMixin { Offset position = Offset(250, 400); bool activeAnimation = false; bool isShow = true; @@ -108,12 +108,11 @@ class _FloatingSearchButton extends State Animation offset; String networkImage; bool isArabic; + @override void initState() { - controller = - AnimationController(vsync: this, duration: Duration(seconds: 1)); - offset = Tween(begin: Offset(0.0, 1.0), end: Offset(0.0, 0.0)) - .animate(controller); + controller = AnimationController(vsync: this, duration: Duration(seconds: 1)); + offset = Tween(begin: Offset(0.0, 1.0), end: Offset(0.0, 0.0)).animate(controller); if (IS_VOICE_COMMAND_CLOSED == true) { controller.reverse(from: -1); } @@ -158,6 +157,7 @@ class _FloatingSearchButton extends State controller.dispose(); super.dispose(); } + // @override // void didUpdateWidget(FloatingSearchButton oldWidget) { // // super.didUpdateWidget(oldWidget); @@ -168,13 +168,12 @@ class _FloatingSearchButton extends State // // }); // } - AuthenticatedUserObject authenticatedUserObject = - locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); VitalSignService _vitalSignService = locator(); + @override Widget build(BuildContext context) { - return Container( - child: SlideTransition(position: offset, child: getStack())); + return Container(child: SlideTransition(position: offset, child: getStack())); } Widget getStack() { @@ -188,13 +187,10 @@ class _FloatingSearchButton extends State child: networkImage != null ? CachedNetworkImage( imageUrl: networkImage, - placeholder: (context, url) => - Image.asset('assets/images/gif/robot-idle.gif'), + placeholder: (context, url) => Image.asset('assets/images/gif/robot-idle.gif'), errorWidget: (context, url, error) => Icon(Icons.error), ) - : Image.asset(isAnimationEnable == true - ? 'assets/images/gif/robot-speaking.gif' - : 'assets/images/gif/robot-idle.gif'), + : Image.asset(isAnimationEnable == true ? 'assets/images/gif/robot-speaking.gif' : 'assets/images/gif/robot-idle.gif'), ), onTap: () { new RoboSearch(context: context).showAlertDialog(context); @@ -227,10 +223,8 @@ class _FloatingSearchButton extends State } startVoiceSearch() async { - _currentLocaleId = - TranslationBase.of(AppGlobal.context).locale.languageCode; - bool available = await speech.initialize( - onStatus: statusListener, onError: errorListener); + _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode; + bool available = await speech.initialize(onStatus: statusListener, onError: errorListener); if (available) { speech.listen( onResult: resultListener, @@ -279,8 +273,7 @@ class _FloatingSearchButton extends State } void requestPermissions() async { - if (await Permission.microphone.isDenied || - await Permission.microphone.isUndetermined) { + if (await Permission.microphone.isDenied || await Permission.microphone.isUndetermined) { Map statuses = await [ Permission.microphone, ].request(); @@ -288,8 +281,7 @@ class _FloatingSearchButton extends State } Future initSpeechState() async { - bool hasSpeech = await speech.initialize( - onError: errorListener, onStatus: statusListener); + bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); //if (hasSpeech) { // _currentLocaleId = // _currentLocaleId == 'en' @@ -317,14 +309,9 @@ class _FloatingSearchButton extends State } getPages(text) { - var request = { - 'VoiceMessage': text, - 'Lang': _currentLocaleId == 'en' ? 'En' : 'Ar' - }; + var request = {'VoiceMessage': text, 'Lang': _currentLocaleId == 'en' ? 'En' : 'Ar'}; - searchProvider - .getBotPages(request) - .then((value) => {getCommands(value['Understand'])}); + searchProvider.getBotPages(request).then((value) => {getCommands(value['Understand'])}); } getCommands(result) async { @@ -374,8 +361,7 @@ class _FloatingSearchButton extends State //= result['ProjectId'] ? result['ProjectId'] : 0; //result['ProjectId']; if (clnicID.length == 1) { - getDoctorsList(result['ProjectId'], clnicID[0], context, - doctorId: null, doctorName: null, isNearest: true); + getDoctorsList(result['ProjectId'], clnicID[0], context, doctorId: null, doctorName: null, isNearest: true); } else { goToClinic(clnicID); } @@ -507,8 +493,7 @@ class _FloatingSearchButton extends State Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => MyWebView( title: "HMG News", - selectedUrl: - "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", ))); } break; @@ -578,11 +563,9 @@ class _FloatingSearchButton extends State case '35': { if (Platform.isIOS) { - launch( - "https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"); + launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"); } else { - launch( - "https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en"); + launch("https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en"); } } break; @@ -713,9 +696,7 @@ class _FloatingSearchButton extends State List docProfileList = []; DoctorsListService service = new DoctorsListService(); - service - .getDoctorsProfile(doctorId, clinicId, projectId, context) - .then((res) { + service.getDoctorsProfile(doctorId, clinicId, projectId, context).then((res) { if (res['MessageStatus'] == 1) { if (res['DoctorProfileList'].length != 0) { res['DoctorProfileList'].forEach((v) { @@ -723,8 +704,7 @@ class _FloatingSearchButton extends State }); } - navigateToDoctorProfile(context, doctorData[0], docProfileList[0], - isAppo: true); + navigateToDoctorProfile(context, doctorData[0], docProfileList[0], isAppo: true); //speak(); } }).catchError((err) { @@ -732,35 +712,27 @@ class _FloatingSearchButton extends State }); } - getDoctorsList(projectId, clinicId, context, - {doctorId, doctorName, isNearest = false}) { + getDoctorsList(projectId, clinicId, context, {doctorId, doctorName, isNearest = false}) { List doctorsList = []; List arr = []; List arrDistance = []; DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(context); - service - .getDoctorsList(clinicId, projectId, isNearest, context, - doctorId: doctorId, doctorName: doctorName) - .then((res) { + service.getDoctorsList(clinicId, projectId, isNearest, context, doctorId: doctorId, doctorName: doctorName).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { - if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && - res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) { + if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) { doctorsList.clear(); res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) { v1['DoctorList'].forEach((v) { doctorsList.add(new DoctorList.fromJson(v)); arr.add(new DoctorList.fromJson(v).projectName); - arrDistance.add(new DoctorList.fromJson(v) - .projectDistanceInKiloMeters - .toString()); + arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString()); }); }); if (doctorsList.length == 1) { - getDoctorProfile( - projectId, clinicId, doctorId[0], context, doctorsList); + getDoctorProfile(projectId, clinicId, doctorId[0], context, doctorsList); //speak(); } else { @@ -772,14 +744,11 @@ class _FloatingSearchButton 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()); + arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString()); }); if (doctorsList.length == 1) { - getDoctorProfile( - projectId, clinicId, doctorId[0], context, doctorsList); + getDoctorProfile(projectId, clinicId, doctorId[0], context, doctorsList); //speak(); } else { @@ -797,8 +766,7 @@ class _FloatingSearchButton extends State }); } - Future navigateToDoctorProfile(context, docObject, docProfile, - {isAppo}) async { + Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async { Navigator.push( context, FadePage( @@ -815,11 +783,7 @@ class _FloatingSearchButton extends State Navigator.push( context, FadePage( - page: BranchView( - doctorsList: docList, - result: result, - num: numAll, - resultDistance: arrDistance), + page: BranchView(doctorsList: docList, result: result, num: numAll, resultDistance: arrDistance), ), ); } @@ -834,15 +798,11 @@ class _FloatingSearchButton extends State if (isInit == true) { event.setValue({"animationEnable": 'true'}); } - if (isArabic == false && - results['ReturnMessage'] != null && - isInit == false) { - await flutterTts - .setVoice({"name": "en-au-x-aub-network", "locale": "en-AU"}); + if (isArabic == false && results['ReturnMessage'] != null && isInit == false) { + await flutterTts.setVoice({"name": "en-au-x-aub-network", "locale": "en-AU"}); await flutterTts.speak(results['ReturnMessage']); } else if (results['ReturnMessage_Ar'] != null && isInit == false) { - await flutterTts - .setVoice({"name": "ar-xa-x-ard-network", "locale": "ar"}); + await flutterTts.setVoice({"name": "ar-xa-x-ard-network", "locale": "ar"}); await flutterTts.speak(results['ReturnMessage_Ar']); } @@ -866,18 +826,15 @@ class _FloatingSearchButton extends State getUserData() async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { - user = AuthenticatedUser.fromJson( - await this.sharedPref.getObject(USER_PROFILE)); + user = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); } } initialSpeak() async { await flutterTts.awaitSpeakCompletion(true); results = { - 'ReturnMessage_Ar': - "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.", - 'ReturnMessage': - "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file." + 'ReturnMessage_Ar': "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.", + 'ReturnMessage': "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file." }; if (IS_VOICE_COMMAND_CLOSED == false) { if (IS_TEXT_COMPLETED == false) { @@ -931,6 +888,7 @@ class _FloatingSearchButton extends State class RoboSearch { final BuildContext context; static var dialog; + RoboSearch({ @required this.context, }); @@ -986,14 +944,11 @@ class _MyStatefulBuilderState extends State { var searchText; static StreamSubscription streamSubscription; static var isClosed = false; + @override void initState() { streamSubscription = event.controller.stream.listen((p) { - if ((p['searchText'] != 'null' && - p['searchText'] != null && - p['searchText'] != "" && - isClosed == false) && - mounted) { + if ((p['searchText'] != 'null' && p['searchText'] != null && p['searchText'] != "" && isClosed == false) && mounted) { setState(() { searchText = p['searchText']; }); @@ -1024,9 +979,7 @@ class _MyStatefulBuilderState extends State { child: Container( margin: EdgeInsets.all(20), padding: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - border: Border.all(width: 2, color: Colors.red)), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 2, color: Colors.red)), child: Icon( Icons.mic, color: Colors.blue, @@ -1040,12 +993,7 @@ class _MyStatefulBuilderState extends State { 'assets/images/soundWaveAnimation.gif', height: 75, ))), - Expanded( - flex: 1, - child: Center( - child: AppText(searchText != null && searchText != 'null' - ? searchText - : TranslationBase.of(context).trySaying))), + Expanded(flex: 1, child: Center(child: AppText(searchText != null && searchText != 'null' ? searchText : TranslationBase.of(context).trySaying))), searchText == 'null' ? Center( child: RaisedButton(