diff --git a/assets/images/Dr_Schedule_report.png b/assets/images/Dr_Schedule_report.png new file mode 100644 index 00000000..9519f719 Binary files /dev/null and b/assets/images/Dr_Schedule_report.png differ diff --git a/assets/images/al-habib_onlne_pharmacy_bg.png b/assets/images/al-habib_onlne_pharmacy_bg.png new file mode 100644 index 00000000..d8809570 Binary files /dev/null and b/assets/images/al-habib_onlne_pharmacy_bg.png differ diff --git a/assets/images/contact_us_bg.png b/assets/images/contact_us_bg.png new file mode 100644 index 00000000..1a7cc71e Binary files /dev/null and b/assets/images/contact_us_bg.png differ diff --git a/assets/images/emergency_service_image.png b/assets/images/emergency_service_image.png new file mode 100644 index 00000000..4dbcb7d6 Binary files /dev/null and b/assets/images/emergency_service_image.png differ diff --git a/assets/images/hmg_services_bg .png b/assets/images/hmg_services_bg .png new file mode 100644 index 00000000..508f9a0d Binary files /dev/null and b/assets/images/hmg_services_bg .png differ diff --git a/assets/images/home_healthcare_service_bg.png b/assets/images/home_healthcare_service_bg.png new file mode 100644 index 00000000..2765b47e Binary files /dev/null and b/assets/images/home_healthcare_service_bg.png differ diff --git a/assets/images/offer_icon.png b/assets/images/offer_icon.png new file mode 100644 index 00000000..527fd5a2 Binary files /dev/null and b/assets/images/offer_icon.png differ diff --git a/lib/config/config.dart b/lib/config/config.dart index 685d0d7d..ddedb282 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; const MAX_SMALL_SCREEN = 660; -const BASE_URL = 'https://uat.hmgwebservices.com/Services'; +const BASE_URL = 'https://hmgwebservices.com/Services'; const GET_PROJECT = '/Lists.svc/REST/GetProject'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 987feb96..0cec3446 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -11,7 +11,7 @@ const Map> localizedValues = { 'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, 'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'}, 'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'}, - 'respirationRate':{'en': 'Respiration Rate', 'ar': 'معدل التنفس'}, + 'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'}, 'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'}, 'searchBy': {'en': 'Search By:', 'ar': 'البحث عن طريق:'}, 'clinic': {'en': 'Clinic', 'ar': 'العيادة'}, @@ -58,15 +58,41 @@ const Map> localizedValues = { 'viewQR': {'en': 'View QR Code', 'ar': 'عرض رمز الاستجابة السريعة'}, 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, - 'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, + 'cancelAppoMsg': { + 'en': 'Are you sure you want to cancel this appointment?', + 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟' + }, - 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'}, - 'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'}, - 'upcoming-payment-pending': {'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'}, - 'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'}, - 'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'}, - 'upcoming-virtual': {'en': 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'}, - 'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'}, + 'upcoming-noAction': { + 'en': 'No Action Required', + 'ar': 'لا يوجد إجراء مطلوب' + }, + 'upcoming-confirm': { + 'en': 'Please confirm the appointment to avoid cancellation', + 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء' + }, + 'upcoming-payment-pending': { + 'en': + 'Online Payment will be Activated before 24 Hours of Appointment Time', + 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز' + }, + 'upcoming-payment-now': { + 'en': 'Pay Online now to avoid long waiting queue', + 'ar': 'ادفع الآن لتفادي الانتظار' + }, + 'upcoming-QR': { + 'en': 'Use the QR Code to Check-In in hospital', + 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى' + }, + 'upcoming-virtual': { + 'en': + 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', + 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.' + }, + 'upcoming-livecare': { + 'en': 'This is a LiveCare appointment', + 'ar': 'هذا موعد لايف كير' + }, 'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'}, 'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'}, 'raise': {'en': 'Raise', 'ar': 'رفع'}, @@ -161,27 +187,67 @@ const Map> localizedValues = { "before": {"en": "Before", "ar": "قبل"}, "minute": {"en": "Minutes", "ar": "دقيقة"}, "hour": {"en": "Hour", "ar": "ساعة"}, - "reminderSuccess": {"en": "The reminder has been added successfully", "ar": "يضاف التذكير بنجاح"}, - "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, + "reminderSuccess": { + "en": "The reminder has been added successfully", + "ar": "يضاف التذكير بنجاح" + }, + "patientShareToDo": { + "en": "Amount before tax: ", + "ar": "المبلغ قبل الضريبة:" + }, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, - "patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, + "patientShareTotalToDo": { + "en": "Total amount Due: ", + "ar": "المبلغ الإجمالي المستحق:" + }, 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, - 'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, - 'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'}, - 'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, - 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, - 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, - 'scanQRHospital': {'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'}, + 'noNeedToWaitInLine': { + 'en': 'No need to stand in line.', + 'ar': 'لا داعي للوقوف في الطابور.' + }, + 'useQRAppoAttend': { + 'en': 'Use the QR code to register the appointment attendance.', + 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.' + }, + 'passQRAppoAttend': { + 'en': + 'Pass the QR code through the attendance devices available in the Hospital.', + 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.' + }, + 'sitWaitingQR': { + 'en': 'Sit in the waiting rooms until called by the nurse.', + 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.' + }, + 'attendRegisterCode': { + 'en': 'Attendance registration code', + 'ar': 'رمز تسجيل الحضور' + }, + 'scanQRHospital': { + 'en': 'Scan above QR Code to Check-In on the Machine in Hospital', + 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى' + }, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "close": {"en": "Close", "ar": "مغلق"}, "booked": {"en": "Booked", "ar": "محجوز"}, "confirmed": {"en": "Confirmed", "ar": "مؤكد"}, "arrived": {"en": "Arrived", "ar": "تم الحضور"}, - "payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, - "payNowBookSuccesstext1": {"en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"}, - "payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment Or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"}, + "payNowBookSuccess": { + "en": "Pay now via Al Habib App", + "ar": "ادفع الآن عبر تطبيق الحبيب" + }, + "payNowBookSuccesstext1": { + "en": "Pay Now using online payment service From secure payment gateways", + "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة" + }, + "payNowBookSuccesstext2": { + "en": "You can also Pay Later via online payment Or in Hospital", + "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى" + }, 'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'}, - 'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'}, + 'askDocNotAllowed': { + 'en': 'This service will be available for last 15 days doctor Visit only', + 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط' + }, "more-verify": { "en": "More Verification Options", "ar": "المزيد من خيارات التحقق" @@ -221,9 +287,9 @@ const Map> localizedValues = { 'respiration': {'en': 'Respiration', 'ar': 'التنفس'}, 'bloodPressure': {'en': 'Blood Pressure', 'ar': 'ضغط الدم'}, 'painScale': {'en': 'Pain Scale', 'ar': 'مقياس الألم'}, - 'weight' : {'en':'Weight','ar':'الوزن'}, - 'height' : {'en':'Height','ar':'الطول'}, - 'heart' :{'en':'Heart','ar':'قلب'}, + 'weight': {'en': 'Weight', 'ar': 'الوزن'}, + 'height': {'en': 'Height', 'ar': 'الطول'}, + 'heart': {'en': 'Heart', 'ar': 'قلب'}, "request": {"en": "Request", "ar": "طلبات الاضافة"}, "member-name": {"en": "Member Name", "ar": "اسم العضو"}, @@ -252,5 +318,20 @@ const Map> localizedValues = { "policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التاميت:"}, "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"}, "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, - "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"} + "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"}, + "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, + "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك البية'}, + "viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, + "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'}, + "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدلايات الحبيب'}, + "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, + "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع عبر الإلكتدوني'}, + "OffersAndPackages": {"en": "Offers and Packages", 'ar': 'العروض والباقات'}, + "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'}, + "HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'}, + "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'}, + "viewAll": {"en": "View All", 'ar': 'عرض الكل'}, + "ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'}, + "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'}, + "medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'}, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 8e139aa1..ad8754e8 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -2,10 +2,16 @@ import 'dart:convert'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; +import '../../../locator.dart'; +import '../../../routes.dart'; + AppSharedPreferences sharedPref = new AppSharedPreferences(); ///Example @@ -15,6 +21,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences(); /// body: null); class BaseAppClient { + post(String endPoint, {Map body, Function(dynamic response, int statusCode) onSuccess, @@ -24,19 +31,32 @@ class BaseAppClient { try { //Map profile = await sharedPref.getObj(DOCTOR_PROFILE); String token = await sharedPref.getString(TOKEN); - var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var user = await sharedPref.getObject(USER_PROFILE); - body['SetupID'] = body.containsKey('SetupID') ? body['SetupID']!=null? body['SetupID'] :SETUP_ID :SETUP_ID; - body['VersionID'] = body.containsKey('VersionID') ? body['VersionID']!=null? body['VersionID'] :VERSION_ID :VERSION_ID; + body['SetupID'] = body.containsKey('SetupID') + ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID + : SETUP_ID; + body['VersionID'] = body.containsKey('VersionID') + ? body['VersionID'] != null ? body['VersionID'] : VERSION_ID + : VERSION_ID; body['Channel'] = CHANNEL; body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['IPAdress'] = IP_ADDRESS; body['generalid'] = GENERAL_ID; - body['PatientOutSA'] = body.containsKey('PatientOutSA') ? body['PatientOutSA']!=null? body['PatientOutSA'] :PATIENT_OUT_SA :PATIENT_OUT_SA; + body['PatientOutSA'] = body.containsKey('PatientOutSA') + ? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA + : PATIENT_OUT_SA; body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND; body['DeviceTypeID'] = DeviceTypeID; - body['PatientType'] = body.containsKey('PatientType') ? body['PatientType']!=null? body['PatientType'] :PATIENT_TYPE :PATIENT_TYPE; - body['PatientTypeID'] = body.containsKey('PatientTypeID') ? body['PatientTypeID']!=null? body['PatientTypeID'] :PATIENT_TYPE_ID :PATIENT_TYPE_ID; + body['PatientType'] = body.containsKey('PatientType') + ? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE + : PATIENT_TYPE; + body['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + : PATIENT_TYPE_ID + : PATIENT_TYPE_ID; if (user != null) { body['TokenID'] = token; body['PatientID'] = user['PatientID']; @@ -101,6 +121,8 @@ class BaseAppClient { logout() async { await sharedPref.remove(LOGIN_TOKEN_ID); + Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE); + } String getSessionId(String id) { diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index e91ea4f2..ed752b50 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -43,10 +43,10 @@ class ProjectViewModel with ChangeNotifier { void loadSharedPrefLanguage() async { currentLanguage = await sharedPref.getString(APP_LANGUAGE); - _appLocale = Locale(currentLanguage ?? 'en'); + _appLocale = Locale(currentLanguage ?? 'ar'); _isArabic = currentLanguage != null ? currentLanguage == 'ar' ? true : false - : false; + : true; notifyListeners(); } diff --git a/lib/locator.dart b/lib/locator.dart index 961429bd..da133687 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -62,4 +62,5 @@ void setupLocator() { locator.registerFactory(() => MedicalViewModel()); locator.registerFactory(() => DashboardViewModel()); locator.registerFactory(() => AppointmentRateViewModel()); + } diff --git a/lib/main.dart b/lib/main.dart index dd0f3d97..a369aa1a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'config/size_config.dart'; @@ -54,7 +55,7 @@ class MyApp extends StatelessWidget { hintColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Colors.grey[100], + scaffoldBackgroundColor:Hexcolor('#E0E0E0'),// Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0), canvasColor: Colors.white, diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index b172cffc..eb5f4695 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,16 +1,12 @@ -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/hospital_view_model.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; - -import '../base/base_view.dart'; -import '../feedback/feedback_home_page.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; class HomePage extends StatefulWidget { @override @@ -20,34 +16,432 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( body: Container( width: double.infinity, - child: FractionallySizedBox( - widthFactor: 0.95, + child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - InkWell( - onTap: ()=>Navigator.push(context, FadePage(page: FeedbackHomePage())), - child: Container( - margin: EdgeInsets.only(top: 12), - width: double.infinity, - height: 180, - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.white, - borderRadius: BorderRadius.circular(12.0), - border: Border.all( - color: Colors.grey[400], - width: 1.0, - ), + Stack( + children: [ + Column( + children: [ + Container( + width: double.infinity, + height: 210, + decoration: BoxDecoration( + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/timeline_bg.png'), + fit: BoxFit.cover), + ), + child: Stack( + children: [ + Positioned( + top: 30, + left: 15, + right: 15, + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Row( + children: [ + Expanded( + child: Container( + height: 110, + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + color: Colors.transparent + .withOpacity(0.3), + ), + ), + ), + Expanded( + child: Container( + height: 110, + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + color: Colors.transparent + .withOpacity(0.3), + )), + ), + ], + ), + ), + ) + ], + ), + ), + Container(width: double.infinity, height: 80) + ], ), - child: Center( - child: Texts('Feedback'), + Positioned( + top: 155, + left: MediaQuery.of(context).size.width * + (MediaQuery.of(context).orientation == + Orientation.landscape + ? 0.02 + : 0.03), + right: MediaQuery.of(context).size.width * + (MediaQuery.of(context).orientation == + Orientation.landscape + ? 0.02 + : 0.03), + child: Container( + width: double.infinity, + height: 125, + decoration: BoxDecoration( + color: Hexcolor('#A59E9E'), + 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)), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).myMedicalFile, + color: Colors.black87, + bold: true, + fontSize: 23, + ), + SizedBox( + height: 5, + ), + Texts( + TranslationBase.of(context).myMedicalFileSubTitle, + color: Colors.black, + fontSize: 16, + ), + Align( + alignment: projectViewModel.isArabic? Alignment.bottomLeft: Alignment.bottomRight, + child: InkWell( + onTap: () {}, + child: Container( + margin: EdgeInsets.all(2), + width: 90, + height: 30, + decoration: BoxDecoration( + color: Hexcolor('#D81A2E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), + ), + child: Center( + child: Texts( + TranslationBase.of(context).viewMore, + color: Colors.white, + fontSize: 12, + ), + ), + ), + ), + ) + ], + ), + ), + ), ), + ], + ), + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + DashboardItem( + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/Dr_Schedule_report.png', + width: 50, + height: 50, + ), + SizedBox( + height: 15, + ), + Texts( + TranslationBase.of(context).homeHealthCareService, + textAlign: TextAlign.center, + color: Colors.white, + bold: true, + fontSize: 14, + ) + ], + ), + ), + ), + height: 150, + imageName: 'home_healthcare_service_bg.png', + opacity: 0.5, + ), + DashboardItem( + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/new-design/pharmacy_icon.png', + width: 40, + height: 40, + ), + SizedBox( + height: 15, + ), + Texts( + TranslationBase.of(context).onlinePharmacy, + textAlign: TextAlign.center, + color: Colors.white, + bold: true, + + ) + ], + ), + ), + ), + height: 150, + imageName: 'al-habib_onlne_pharmacy_bg.png', + ), + DashboardItem( + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/Dr_Schedule_report.png', + width: 50, + height: 50, + ), + SizedBox( + height: 15, + ), + Texts( + TranslationBase.of(context).emergencyService, + textAlign: TextAlign.center, + color: Colors.white, + bold: true, + fontSize: 14, + ) + ], + ), + ), + ), + height: 150, + color: Hexcolor("#747C80"), + imageName: 'emergency_service_image.png', + ), + ], + ), + ), + SizedBox( + height: 8, + ), + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.29, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/new-design/online_payment_icon.png', + width: 80, + height: 50, + ), + SizedBox( + height: 15, + ), + Texts( + TranslationBase.of(context).onlinePaymentService, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier * 2, + ) + ], + ), + ), + ), + height: 150, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + ), + Container( + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/offer_icon.png', + width: 50, + height: 50, + ), + SizedBox( + height: 15, + ), + Texts( + TranslationBase.of(context).offersAndPackages, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier * 2, + ) + ], + ), + ), + ), + width: MediaQuery.of(context).size.width * 0.29, + height: 150, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + )), + Container( + width: MediaQuery.of(context).size.width * 0.29, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/Dr_Schedule_report.png', + width: 50, + height: 50, + ), + SizedBox( + height: 15, + ), + Texts( + TranslationBase.of(context).comprehensiveMedicalCheckup, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier * 1.60, + ) + ], + ), + ), + ), + height: 150, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + ), + ], + ), + ), + SizedBox( + height: 8, + ), + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + DashboardItem( + child: Container( + width: double.infinity, + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).hMGService, + color: Colors.white, + fontWeight: FontWeight.normal, + ), + + Texts( + TranslationBase.of(context).viewAllHabibMedicalService, + color: Colors.white, + fontWeight: FontWeight.normal, + fontSize: 10, + ), + Expanded( + child: Container(), + ), + Text( + TranslationBase.of(context).viewMore, + //color: Colors.white, + //fontWeight: FontWeight.normal, + ) + ], + ), + ), + height: 100, + imageName: 'hmg_services_bg .png', + opacity: 0.5, + color: Colors.grey[700], + width: MediaQuery.of(context).size.width * 0.45, + ), + DashboardItem( + child: Container( + width: double.infinity, + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).contactUs, + color: Colors.white, + fontWeight: FontWeight.normal, + ), + + Texts( + TranslationBase.of(context).viewAllWaysReachUs, + color: Colors.white, + fontWeight: FontWeight.normal, + fontSize: 10, + ), + Expanded( + child: Container(), + ), + Texts( + TranslationBase.of(context).viewMore, + color: Colors.white, + fontWeight: FontWeight.normal, + ) + ], + ), + ), + height: 100, + imageName: 'contact_us_bg.png', + opacity: 0.5, + color: Colors.grey[700], + width: MediaQuery.of(context).size.width * 0.45, + ), + ], ), ), + SizedBox( + height: 80, + ) ], ), ), @@ -55,3 +449,60 @@ class _HomePageState extends State { ); } } + +class DashboardItem extends StatelessWidget { + const DashboardItem( + {this.hasBorder = false, + this.imageName, + @required this.child, + this.onTap, + Key key, + this.width, + this.height, + this.color, + this.opacity = 0.4}) + : super(key: key); + final bool hasBorder; + final String imageName; + final Widget child; + final Function onTap; + final double width; + final double height; + final Color color; + final double opacity; + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Container( + width: width != null ? width : MediaQuery.of(context).size.width * 0.29, + height: height != null + ? height + : MediaQuery.of(context).orientation == Orientation.portrait + ? MediaQuery.of(context).size.height * 0.19 + : MediaQuery.of(context).size.height * 0.35, + decoration: BoxDecoration( + color: !hasBorder + ? color != null ? color : Hexcolor('#050705').withOpacity(opacity) + : Colors.white, + borderRadius: BorderRadius.circular(6.0), + border: hasBorder + ? Border.all(width: 1.0, color: const Color(0xffcccccc)) + : Border.all(width: 0.0, color: Colors.transparent), + image: imageName != null + ? DecorationImage( + image: AssetImage('assets/images/$imageName'), + fit: BoxFit.cover, + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn), + ) + : null, + ), + child: Center( + child: child, + ), + ), + ); + } +} diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 7920e1d4..da9400ad 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; @@ -10,9 +11,11 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; import 'home_page.dart'; class LandingPage extends StatefulWidget { @@ -93,7 +96,7 @@ class _LandingPageState extends State { case 0: return TranslationBase.of(context).home; case 1: - return 'Search Medicine'; + return 'Medical Profile'; case 2: return TranslationBase.of(context).mySchedule; case 3: diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 93fcf496..8943e84c 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -404,6 +404,23 @@ class TranslationBase { localizedValues['insuranceCards'][locale.languageCode]; String get requestType => localizedValues['requestType'][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 contactUs =>localizedValues['ContactUs'][locale.languageCode]; + String get viewAllWaysReachUs =>localizedValues['ViewAllWaysReachUs'][locale.languageCode]; + String get medicalProfile =>localizedValues['medicalProfile'][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index dd186c56..890558dc 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -58,7 +58,7 @@ class _BottomNavBarState extends State { changeIndex: _changeIndex, index: _index, currentIndex: 1, - name: TranslationBase.of(context).replay2, + name: TranslationBase.of(context).medicalProfile, ), // Expanded( // child: SizedBox(