From 3c5adc0a1d6b19289e54e904a757e9105bf68d9d Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 23 Sep 2020 16:15:05 +0300 Subject: [PATCH 1/5] HMG Service layout --- .../images/medical/blood_cholesterol_icon.png | Bin 0 -> 4682 bytes assets/images/medical/blood_sugar_icon.png | Bin 0 -> 2713 bytes .../medical/triglycerides_blood_icon.png | Bin 0 -> 4713 bytes lib/config/localized_values.dart | 157 +++++---- .../all_habib_medical_service_page.dart | 303 ++++++++++++++++-- .../health_converter.dart | 94 ++++++ .../health_converter/blood_sugar.dart | 208 ++++++++++++ lib/pages/landing/home_page.dart | 4 +- lib/pages/landing/landing_page.dart | 226 ++++++------- lib/pages/medical/medical_profile_page.dart | 2 +- .../data_display/services)contaniner.dart | 50 +++ 11 files changed, 847 insertions(+), 197 deletions(-) create mode 100644 assets/images/medical/blood_cholesterol_icon.png create mode 100644 assets/images/medical/blood_sugar_icon.png create mode 100644 assets/images/medical/triglycerides_blood_icon.png create mode 100644 lib/pages/AlHabibMedicalService/health_converter.dart create mode 100644 lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart create mode 100644 lib/widgets/data_display/services)contaniner.dart diff --git a/assets/images/medical/blood_cholesterol_icon.png b/assets/images/medical/blood_cholesterol_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3f1ab21602302b6c639121593be971279d249107 GIT binary patch literal 4682 zcmV-Q61DA#P)1{ekzbVL|*Kt%`CfC4J0M8FM1QA|`67cema+;G7}#0?{g+i{N?5m!XS zh!KrZM8O3WL~#KDHK@3-$>IRQFf%#Dxy52O>HmBFP0rbQlpetSt{)TW|mo)!=yFK=TenbTJVfFV5E?qBl`)=C8dG zeWM-`EoF>3MAZKb&Q}vr8+QI&R%R2Jv>hICEosyr8x*g-c$Y@Y#Z$Qw%61qI1}}n~A70L-ct; zZDYz@_I*!$HelyUiD)ztHD>2J5Yc5s)N{M8k{s4zp7<8}$$U0cSu~$>c1gZ8sAlUl%nKf3@c$!z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jf{Er2u literal 0 HcmV?d00001 diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index baf3cc69..ac7ee547 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -227,7 +227,10 @@ const Map> localizedValues = { 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى' }, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, - "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, + "EmailSentSuccessfully": { + "en": "Email Sent Successfully", + "ar": "تم إرسال البريد الإلكتروني بنجاح" + }, "close": {"en": "Close", "ar": "مغلق"}, "booked": {"en": "Booked", "ar": "محجوز"}, "confirmed": {"en": "Confirmed", "ar": "مؤكد"}, @@ -367,22 +370,32 @@ const Map> localizedValues = { "consultation": {"en": "Consultation", "ar": "استشارة"}, "logs": {"en": "Logs", "ar": "السجلات"}, "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}, - "locationDialogMessage": {"en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."}, - "parking":{"en":"Parking","ar":"مواقف"}, - "alhabiServices":{"en":"HMG Service","ar":"خدمات الحبيب"}, - "parkingTitle":{"en":"Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.","ar":" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "}, - "readBarcode":{"en":"Read Barcode","ar":"قراءة الكود"}, - "showMyPark":{"en":"Show My Park","ar":"عرض بارك"}, - "clearMyData":{"en":"clear My Data","ar":"امسح البيانات"}, - "floor":{"en":"Floor:","ar":"الطابق"}, - "gate":{"en":"Gate:","ar":"بوابة"}, - "building":{"en":"Building:","ar":"المبنى"}, - "branch":{"en":"Branch:","ar":"الفرع"}, - "emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"}, - "nearester":{"en":"Nearest ER:","ar":"أقرب طوارى"}, - "locationa":{"en":"location:","ar":"الموقع"}, - "ambulancerequest":{"en":"Ambulance :","ar":"طلب نقل "}, - "requestA":{"en":"Request:","ar":"اسعاف"}, + "locationDialogMessage": { + "en": + "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", + "ar": + "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." + }, + "parking": {"en": "Parking", "ar": "مواقف"}, + "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, + "parkingTitle": { + "en": + "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.", + "ar": + " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). " + }, + "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, + "showMyPark": {"en": "Show My Park", "ar": "عرض بارك"}, + "clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"}, + "floor": {"en": "Floor:", "ar": "الطابق"}, + "gate": {"en": "Gate:", "ar": "بوابة"}, + "building": {"en": "Building:", "ar": "المبنى"}, + "branch": {"en": "Branch:", "ar": "الفرع"}, + "emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"}, + "nearester": {"en": "Nearest ER:", "ar": "أقرب طوارى"}, + "locationa": {"en": "location:", "ar": "الموقع"}, + "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, + "requestA": {"en": "Request:", "ar": "اسعاف"}, "MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"}, "NoBookedAppointments": { "en": "No Booked Appointments", @@ -450,43 +463,75 @@ const Map> localizedValues = { "OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"}, "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"}, - "km":{"en":"KMs:","ar":"كم"}, - "PatientHealthSummaryReport":{"en":"Patient Health Summary Report","ar":" ملخص التقارير الشهرية"}, - "ToViewTheTermsAndConditions":{"en":"To View The Terms And Conditions Report","ar":" عرض الشروط والأحكام "}, - "ClickHere":{"en":"Click here","ar":"أنقر هنا"}, - "IAgreeToTheTermsAndConditions":{"en":"I agree to the terms and conditions ","ar":"أوافق على الشروط والاحكام "}, - "IAgreeToTheTermsAndConditionsSubtitle":{"en":"I agree to the terms and conditions ","ar":"هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية"}, - "Save":{"en":"Save","ar":"حفظ "}, - "UserAgreement":{"en":"User Agreement","ar":"اتفاقية الخصوصية "}, - "UpdateSuccessfully":{"en":"Update Successfully","ar":"تم التحديث بنجاح"}, - "CHECK_VACCINE_AVAILABILITY":{"en":"CHECK VACCINE AVAILABILITY","ar":"تحقق من توافر اللقاح"}, - "MyVaccinesAvailability":{"en":"MyVaccinesAvailability","ar":"توفر لقاحي"}, - "PaymentService":{"en":"Payment Service","ar":"خدمة المدفوعات"}, - "PaymentOnline":{"en":"Service","ar":"الالكتروني"}, - "OnlineCheckIn":{"en":"Online Check-In","ar":"مدفوعات معلقة"}, - "MyBalances":{"en":"My Balances","ar":"رصيدي"}, - "BalanceAmount":{"en":"Balance Amount","ar":"رصيدالحساب"}, - "TotalBalance":{"en":"Total Balance","ar":"الرصيد الكلي"}, - "CreateAdvancedPayment":{"en":"Create Advanced Payment","ar":"إنشاء دفعة مقدمة"}, - "AdvancePayment":{"en":"Advance Payment","ar":"الدفع مقدما"}, - "AdvancePaymentLabel":{ - "en":"You can create and add an Advanced Payment for you account or other accounts.", - "ar":"يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"}, - "FileNumber":{"en":"File Number","ar":"رقم الملف"}, - "Amount":{"en":"Amount *","ar":"المبلغ *"}, - "DepositorEmail":{"en":"Depositor Email *","ar":"البريد الإلكتروني للمودع *"}, - "Notes":{"en":"Notes","ar":"ملاحظات"}, - "SelectPatientName":{"en":"Select Patient Name","ar":"اختر اسم المريض"}, - "SelectFamilyPatientName":{"en":"Family Members","ar":"أفراد الأسرة"}, - "SelectHospital":{"en":"Select Hospital","ar":"اختر المستشفى"}, - "MyAccount":{"en":"My Account","ar":"حسابي"}, - "OtherAccount":{"en":"Other Account","ar":"حساب آخر"}, - "SelectBeneficiary":{"en":"Select Beneficiary","ar":"حدد المستفيد"}, - "ConfirmThePayment":{"en":"Confirm The Payment","ar":"تأكيد عملية الدفع"}, - "DepositorName":{"en":"Depositor Name","ar":"اسم المودع *"}, - "MobileNumber":{"en":"Mobile Number","ar":"رقم الجوال"}, - "Ok":{"en":"Ok","ar":"حسنا"}, - "TheVerificationCodeExpiresIn":{"en":"The Verification Code Expires In","ar":"تنتهي صلاحية رمز التحقق في"}, - "PleaseEnterTheVerificationCode":{"en":"Please enter the verification code send to","ar":"الرجاء إدخال رمز التحقق المرسل إلى"}, - + "km": {"en": "KMs:", "ar": "كم"}, + "PatientHealthSummaryReport": { + "en": "Patient Health Summary Report", + "ar": " ملخص التقارير الشهرية" + }, + "ToViewTheTermsAndConditions": { + "en": "To View The Terms And Conditions Report", + "ar": " عرض الشروط والأحكام " + }, + "ClickHere": {"en": "Click here", "ar": "أنقر هنا"}, + "IAgreeToTheTermsAndConditions": { + "en": "I agree to the terms and conditions ", + "ar": "أوافق على الشروط والاحكام " + }, + "IAgreeToTheTermsAndConditionsSubtitle": { + "en": "I agree to the terms and conditions ", + "ar": + "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية" + }, + "Save": {"en": "Save", "ar": "حفظ "}, + "UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "}, + "UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"}, + "CHECK_VACCINE_AVAILABILITY": { + "en": "CHECK VACCINE AVAILABILITY", + "ar": "تحقق من توافر اللقاح" + }, + "MyVaccinesAvailability": { + "en": "MyVaccinesAvailability", + "ar": "توفر لقاحي" + }, + "PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"}, + "PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, + "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, + "MyBalances": {"en": "My Balances", "ar": "رصيدي"}, + "BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"}, + "TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"}, + "CreateAdvancedPayment": { + "en": "Create Advanced Payment", + "ar": "إنشاء دفعة مقدمة" + }, + "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, + "AdvancePaymentLabel": { + "en": + "You can create and add an Advanced Payment for you account or other accounts.", + "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين" + }, + "FileNumber": {"en": "File Number", "ar": "رقم الملف"}, + "Amount": {"en": "Amount *", "ar": "المبلغ *"}, + "DepositorEmail": { + "en": "Depositor Email *", + "ar": "البريد الإلكتروني للمودع *" + }, + "Notes": {"en": "Notes", "ar": "ملاحظات"}, + "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"}, + "SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"}, + "SelectHospital": {"en": "Select Hospital", "ar": "اختر المستشفى"}, + "MyAccount": {"en": "My Account", "ar": "حسابي"}, + "OtherAccount": {"en": "Other Account", "ar": "حساب آخر"}, + "SelectBeneficiary": {"en": "Select Beneficiary", "ar": "حدد المستفيد"}, + "ConfirmThePayment": {"en": "Confirm The Payment", "ar": "تأكيد عملية الدفع"}, + "DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"}, + "MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"}, + "Ok": {"en": "Ok", "ar": "حسنا"}, + "TheVerificationCodeExpiresIn": { + "en": "The Verification Code Expires In", + "ar": "تنتهي صلاحية رمز التحقق في" + }, + "PleaseEnterTheVerificationCode": { + "en": "Please enter the verification code send to", + "ar": "الرجاء إدخال رمز التحقق المرسل إلى" + }, }; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index dc0d3cd2..616b5fd8 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -1,10 +1,21 @@ +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; + +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; +import 'package:diplomaticquarterapp/pages/paymentService/payment_service.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/widgets/data_display/services)contaniner.dart'; class AllHabibMedicalService extends StatefulWidget { @override @@ -17,31 +28,273 @@ class _AllHabibMedicalServiceState extends State { return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).alhabiServices, - body: ListView( - children: [ - InkWell( - onTap: ()=> Navigator.push(context, FadePage(page: ParkingPage())), - child: Container( - height: 50, - margin: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(7), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Texts( - TranslationBase.of(context).parking, - fontSize: 16, - ) - ], - ), - ), + body: Column( + children: [ + Expanded( + child: ListView( + scrollDirection: Axis.vertical, + physics: AlwaysScrollableScrollPhysics(), + shrinkWrap: true, + children: [ + Container( + width: double.infinity, + height: 190, + decoration: BoxDecoration( + image: DecorationImage( + image: ExactAssetImage('assets/images/timeline_bg.png'), + fit: BoxFit.cover, + ), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Health Weather Indicators', + style: TextStyle( + color: Colors.white, + fontSize: 22.0, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 35.0, + ), + Text( + 'Health Tips Based On Current Weather', + style: TextStyle( + color: Colors.white, + ), + ), + ]), + ), + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: MedicalProfilePage(), + ), + ), + imageLocation: + 'assets/images/new-design/my_file_bottom_bar.png', + title: TranslationBase.of(context).myMedicalFile, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: LiveCareHome(), + ), + ), + imageLocation: 'assets/images/new-design/liveCare_ar_bg.png', + title: TranslationBase.of(context).livecare, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: BookingOptions( + isAppbar: true, + ), + ), + ), + imageLocation: + 'assets/images/new-design/booking_icon_active.png', + title: TranslationBase.of(context).bookAppo, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: PaymentService(), + ), + ), + imageLocation: + 'assets/images/al-habib_online_payment_service_icon.png', + title: TranslationBase.of(context).onlinePaymentService, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: + 'assets/images/al-habib_online_payment_service_icon.png', + title: 'Covid-19- Drive-Thru Test', + ), + ServicesContainer( + onTap: () { + Navigator.push( + context, + FadePage( + page: ErOptions( + isAppbar: true, + ), + ), + ); + }, + imageLocation: 'assets/images/emergency_service_image.png', + title: TranslationBase.of(context).emergencyService, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: 'assets/images/pharmacy_logo.png', + title: 'Pharmacy'), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: InsuranceUpdate(), + ), + ), + imageLocation: + 'assets/images/medical/insurance_card_icon.png', + title: TranslationBase.of(context).updateInsurance, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: 'assets/images/ereferral_service_icon.png', + title: 'E-Referral', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: MyFamily(), + ), + ), + imageLocation: + 'assets/images/new-design/family_menu_icon_red.png', + title: 'My Family', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: + 'assets/images/new-design/children_vaccines_icon.png', + title: 'Child Vaccines', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ToDo(), + ), + ), + imageLocation: + 'assets/images/new-design/upcoming_icon_bottom_bar.png', + title: TranslationBase.of(context).todoList, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: 'assets/images/new-design/body_icon.png', + title: 'Symptom Checker'), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: 'assets/images/new-design/blood_icon.png', + title: 'Blood Donation', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: + 'assets/images/new-design/health_calculator_icon.png', + title: 'Health Calculators', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + //page: HealthConverter(), + ), + ), + imageLocation: + 'assets/images/new-design/health_convertor_icon.png', + title: 'Health Converter', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: 'assets/images/new-design/water_icon.png', + title: 'H2O', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: 'assets/images/new-design/smartwatch_icon.png', + title: TranslationBase.of(context).smartWatches, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: + 'assets/images/new-design/parking_system_icon.png', + title: TranslationBase.of(context).parking, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: + 'assets/images/new-design/virtual_tour_icon.png', + title: 'Virtual Tour', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: + 'assets/images/new-design/twitter_dashboard_icon.png', + title: 'Latest News', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: 'assets/images/new-design/find_us_icon.png', + title: 'Find Us', + ), + ], ), ), ], diff --git a/lib/pages/AlHabibMedicalService/health_converter.dart b/lib/pages/AlHabibMedicalService/health_converter.dart new file mode 100644 index 00000000..b499724c --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_converter.dart @@ -0,0 +1,94 @@ +// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +// import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +// import 'package:flutter/material.dart'; +// +// import 'health_converter/blood_sugar.dart'; +// +// class HealthConverter extends StatefulWidget { +// @override +// _HealthConverterState createState() => _HealthConverterState(); +// } +// +// class _HealthConverterState extends State { +// @override +// Widget build(BuildContext context) { +// return AppScaffold( +// isShowAppBar: true, +// appBarTitle: 'Health Converter', +// body: Column( +// children: [ +// Container( +// width: double.infinity, +// height: 30, +// ), +// Row( +// children: [ +// Expanded( +// flex: 1, +// child: InkWell( +// onTap: () { +// Navigator.push( +// context, +// FadePage(page: BloodSugar()), +// ); +// }, +// child: MedicalProfileItem( +// title: 'Blood', +// imagePath: 'blood_sugar_icon.png', +// subTitle: 'Sugar', +// ), +// ), +// ), +// Expanded( +// flex: 1, +// child: InkWell( +// onTap: () { +// Navigator.push( +// context, +// FadePage( +// // page: [](), +// ), +// ); +// }, +// child: MedicalProfileItem( +// title: 'Blood', +// imagePath: 'blood_cholesterol_icon.png', +// subTitle: 'Cholesterol', +// ), +// ), +// ), +// ], +// ), +// Row( +// children: [ +// Expanded( +// flex: 1, +// child: InkWell( +// onTap: () { +// Navigator.push( +// context, +// FadePage( +// // page: [](), +// ), +// ); +// }, +// child: MedicalProfileItem( +// title: 'Triglycerides', +// imagePath: 'triglycerides_blood_icon.png', +// subTitle: 'Fat in blood', +// ), +// ), +// ), +// Expanded( +// flex: 1, +// child: Container(), +// ), +// ], +// ) +// ], +// ), +// ); +// } +// } diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart new file mode 100644 index 00000000..654df11f --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart @@ -0,0 +1,208 @@ +// import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +// import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +// import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// +// const activeCardColor = Color(0xff70777A); +// const inactiveCardColor = Color(0xffFAFAFd); +// +// class BloodSugar extends StatefulWidget { +// @override +// _BloodSugarState createState() => _BloodSugarState(); +// } +// +// Color color; +// +// class _BloodSugarState extends State { +// Color cardMGColor = inactiveCardColor; +// Color cardMMOLColor = inactiveCardColor; +// +// void updateColor(int type) { +// //MG/DLT card +// if (type == 1) { +// if (cardMGColor == inactiveCardColor) { +// cardMGColor = activeCardColor; +// cardMMOLColor = inactiveCardColor; +// } else { +// cardMGColor = inactiveCardColor; +// } +// } +// if (type == 2) { +// if (cardMMOLColor == inactiveCardColor) { +// cardMMOLColor = activeCardColor; +// cardMGColor = inactiveCardColor; +// } else { +// cardMMOLColor = inactiveCardColor; +// } +// } +// } +// +// bool _visible = false; +// +// TextEditingController textController = new TextEditingController(); +// String finalValue; +// +// @override +// Widget build(BuildContext context) { +// return AppScaffold( +// isShowAppBar: true, +// appBarTitle: 'Blood Sugar Conversion', +// body: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// //crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// width: 350.0, +// child: Text( +// 'Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.', +// //textAlign: TextAlign.center, +// style: TextStyle(fontSize: 20.0), +// ), +// ), +// SizedBox( +// height: 15.0, +// ), +// Container( +// color: Colors.white, +// height: 120.0, +// child: Padding( +// padding: const EdgeInsets.all(8.0), +// child: Column( +// //crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Padding( +// padding: const EdgeInsets.symmetric(horizontal: 15.0), +// child: Row( +// children: [ +// Texts( +// 'Convert from', +// ) +// ], +// ), +// ), +// SizedBox( +// height: 9.0, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: [ +// GestureDetector( +// onTap: () { +// setState(() { +// updateColor(1); +// finalValue = textController.text * 3; +// }); +// }, +// child: Container( +// height: 55.0, +// width: 150.0, +// decoration: BoxDecoration( +// color: cardMGColor, +// borderRadius: BorderRadius.circular(10.0), +// ), +// child: Padding( +// padding: const EdgeInsets.symmetric( +// vertical: 0.0, horizontal: 18.0), +// child: Texts('MG/DLt TO \nMMOL/L'), +// ), +// ), +// ), +// GestureDetector( +// onTap: () { +// setState(() { +// updateColor(2); +// finalValue = textController.text * 6; +// }); +// }, +// child: Container( +// height: 55.0, +// width: 150.0, +// decoration: BoxDecoration( +// color: cardMMOLColor, +// borderRadius: BorderRadius.circular(10.0), +// ), +// child: Padding( +// padding: +// const EdgeInsets.symmetric(horizontal: 16.0), +// child: Texts('MG/DLt TO\n MMOL/L'), +// ), +// ), +// ), +// ], +// ), +// ], +// ), +// ), +// ), +// SizedBox( +// height: 25.0, +// ), +// Container( +// height: 55.0, +// color: Colors.white, +// child: TextFormField( +// controller: textController, +// inputFormatters: [ +// FilteringTextInputFormatter.digitsOnly +// ], +// keyboardType: TextInputType.number, +// decoration: InputDecoration( +// labelText: " Enter the reading value", +// ), +// ), +// ), +// SizedBox( +// height: 5.0, +// ), +// Visibility( +// visible: _visible, +// child: Container( +// height: 95.0, +// width: 350.0, +// decoration: BoxDecoration( +// color: Colors.white, +// border: Border.all(color: Colors.black), +// borderRadius: BorderRadius.circular(15.0), +// ), +// child: Padding( +// padding: const EdgeInsets.all(8.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// Texts('Result:'), +// Text( +// finalValue.toString(), +// style: TextStyle(fontSize: 35.0), +// ), +// ], +// ), +// ), +// ), +// ), +// SizedBox( +// height: 15.0, +// ), +// Flexible( +// child: Container( +// height: 100.0, +// width: 150.0, +// child: Button( +// label: 'CALCULATE', +// onTap: () { +// setState(() { +// _visible = !_visible; +// }); +// }, +// ), +// ), +// ), +// ], +// ), +// ), +// ); +// } +// } diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 6e8d5fce..58323bf7 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -445,8 +445,8 @@ class _HomePageState extends State { height: 8, ), InkWell( - onTap: () => Navigator.push( - context, FadePage(page: PaymentService())), + onTap: () => + Navigator.push(context, FadePage(page: PaymentService())), child: Container( margin: EdgeInsets.only(left: 15, right: 15), child: Row( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 315a9aa7..ad8ae6a5 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -120,119 +120,119 @@ class _LandingPageState extends State with WidgetsBindingObserver { }); //_firebase Background message handler - _firebaseMessaging.configure( - onMessage: (Map message) async { - showDialog("onMessage: $message"); - print("onMessage: $message"); - print(message); - print(message['name']); - print(message['appointmentdate']); - - if (Platform.isIOS) { - if (message['is_call'] == "true") { - var route = ModalRoute.of(context); - - if (route != null) { - print(route.settings.name); - } - - Map myMap = new Map.from(message); - print(myMap); - LandingPage.isOpenCallPage = true; - LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); - if (!isPageNavigated) { - isPageNavigated = true; - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => IncomingCall( - incomingCallData: LandingPage.incomingCallData))) - .then((value) { - isPageNavigated = false; - }); - } - } else { - print("Is Call Not Found iOS"); - } - } else { - print("Is Call Not Found iOS"); - } - - if (Platform.isAndroid) { - if (message['data'].containsKey("is_call")) { - var route = ModalRoute.of(context); - - if (route != null) { - print(route.settings.name); - } - - Map myMap = - new Map.from(message['data']); - print(myMap); - LandingPage.isOpenCallPage = true; - LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); - if (!isPageNavigated) { - isPageNavigated = true; - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => IncomingCall( - incomingCallData: LandingPage.incomingCallData))) - .then((value) { - isPageNavigated = false; - }); - } - } else { - print("Is Call Not Found Android"); - } - } else { - print("Is Call Not Found Android"); - } - }, - onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, - onLaunch: (Map message) async { - print("onLaunch: $message"); - showDialog("onLaunch: $message"); - }, - onResume: (Map message) async { - print("onResume: $message"); - print(message); - print(message['name']); - print(message['appointmentdate']); - - showDialog("onResume: $message"); - - if (Platform.isIOS) { - if (message['is_call'] == "true") { - var route = ModalRoute.of(context); - - if (route != null) { - print(route.settings.name); - } - - Map myMap = new Map.from(message); - print(myMap); - LandingPage.isOpenCallPage = true; - LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); - if (!isPageNavigated) { - isPageNavigated = true; - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => IncomingCall( - incomingCallData: LandingPage.incomingCallData))) - .then((value) { - isPageNavigated = false; - }); - } - } else { - print("Is Call Not Found iOS"); - } - } else { - print("Is Call Not Found iOS"); - } - }, - ); + // _firebaseMessaging.configure( + // onMessage: (Map message) async { + // showDialog("onMessage: $message"); + // print("onMessage: $message"); + // print(message); + // print(message['name']); + // print(message['appointmentdate']); + // + // if (Platform.isIOS) { + // if (message['is_call'] == "true") { + // var route = ModalRoute.of(context); + // + // if (route != null) { + // print(route.settings.name); + // } + // + // Map myMap = new Map.from(message); + // print(myMap); + // LandingPage.isOpenCallPage = true; + // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => IncomingCall( + // incomingCallData: LandingPage.incomingCallData))) + // .then((value) { + // isPageNavigated = false; + // }); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // + // if (Platform.isAndroid) { + // if (message['data'].containsKey("is_call")) { + // var route = ModalRoute.of(context); + // + // if (route != null) { + // print(route.settings.name); + // } + // + // Map myMap = + // new Map.from(message['data']); + // print(myMap); + // LandingPage.isOpenCallPage = true; + // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => IncomingCall( + // incomingCallData: LandingPage.incomingCallData))) + // .then((value) { + // isPageNavigated = false; + // }); + // } + // } else { + // print("Is Call Not Found Android"); + // } + // } else { + // print("Is Call Not Found Android"); + // } + // }, + // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, + // onLaunch: (Map message) async { + // print("onLaunch: $message"); + // showDialog("onLaunch: $message"); + // }, + // onResume: (Map message) async { + // print("onResume: $message"); + // print(message); + // print(message['name']); + // print(message['appointmentdate']); + // + // showDialog("onResume: $message"); + // + // if (Platform.isIOS) { + // if (message['is_call'] == "true") { + // var route = ModalRoute.of(context); + // + // if (route != null) { + // print(route.settings.name); + // } + // + // Map myMap = new Map.from(message); + // print(myMap); + // LandingPage.isOpenCallPage = true; + // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => IncomingCall( + // incomingCallData: LandingPage.incomingCallData))) + // .then((value) { + // isPageNavigated = false; + // }); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // }, + // ); } showDialog(String message) { diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 678ede88..79c5571d 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -43,7 +43,7 @@ class _MedicalProfilePageState extends State { onModelReady: (model) => model.getAppointmentHistory(), builder: (_, model, widget) => AppScaffold( baseViewModel: model, - body: SafeArea( + body: Container( child: SingleChildScrollView( child: Column( children: [ diff --git a/lib/widgets/data_display/services)contaniner.dart b/lib/widgets/data_display/services)contaniner.dart new file mode 100644 index 00000000..91b0b59d --- /dev/null +++ b/lib/widgets/data_display/services)contaniner.dart @@ -0,0 +1,50 @@ +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; + +class ServicesContainer extends StatelessWidget { + final String title; + final String imageLocation; + final Function onTap; + + ServicesContainer({this.title, this.imageLocation, this.onTap}); + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () => onTap(), + child: Container( + height: 60, + margin: EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(7), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Image.asset( + imageLocation, + height: 30, + width: 40, + ), + SizedBox( + width: 20, + ), + Texts( + title, + fontSize: 16, + ), + ], + ), + ], + ), + ), + ), + ); + } +} From de5633d58b52cbea5b5425083d3abbaa8935c9e8 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 23 Sep 2020 21:59:09 +0300 Subject: [PATCH 2/5] Contact us --- .../LiveChat/hospitalsLivechat_page.dart | 232 ++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart new file mode 100644 index 00000000..96dd5309 --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -0,0 +1,232 @@ +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:giffy_dialog/giffy_dialog.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:maps_launcher/maps_launcher.dart'; + + + +class HospitalsLiveChatPage extends StatefulWidget { + @override + _HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState(); +} +//bool viewObject = true; + +class _HospitalsLiveChatPageState extends State { +int tappedIndex; + +@override + void initState() + { + super.initState(); + tappedIndex=0; + } + + + // changeStyle(){ + // + // setState(() { + // //viewObject = false ; + // }); + // // print(viewObject); + // } + + + + @override + + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getLiveChatRequestOrders(),//getFindUsRequestOrders(),//model.getCOC(), + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15,right: 15,top: 70), + child: Column( + children: [ + ...List.generate(model.LiveChatModelList.length, (index) => Container(//FindusHospitalModelList.length + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all(color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(5)), + color: tappedIndex==index ? Colors.red:Colors.white , + ), + + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + InkWell( + onTap: (){ + print(model.LiveChatModelList[index].value); + print(model.user.patientID); + print(model.user.firstName); + //changeStyle(); + setState(() { + //viewObject = false ; + tappedIndex=index; + }); + // launch("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=TAMER&PatientID=1231755&MobileNo=537503378&Language=en&WorkGroup=Dubai_Eng_Chat"); + + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.end, + + children: [ + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + // InkWell( + // onTap:(){ + // // showDialog( + // // context: context,builder: (_) => AssetGiffyDialog( + // // title: Text(model.FindusHospitalModelList[index].locationName, + // // style: TextStyle( + // // fontSize: 22.0, fontWeight: FontWeight.w600), + // // ),image:Image.network(model.FindusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), + // // buttonCancelText:Text('cancel') , + // // buttonCancelColor: Colors.grey, + // // onlyCancelButton: true, + // // + // // ) ); + // }, + // child: Container( + // width: 70, + // height: 70, + // child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())), + // ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: Texts('${model.LiveChatModelList[index].projectName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl + Expanded( + flex: 1, + child: Row( + children: [ + // IconButton( + // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), + // tooltip: 'Increase volume by 10', + // onPressed: () { + // setState(() { + // MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); + // // _volume += 10; + // }); + // }, + // ), + IconButton( + icon: Icon(Icons.arrow_forward_rounded,color: Colors.black,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + ], + ), + ), + + + + ], + ), + ), + + ], + ), + ) + + // Texts('${model.FindusHospitalModelList[index].locationName}'), + //Divider(height: 4.5,color: Colors.grey[500],) + + + ], + + ), + + ), + ) + ), + SizedBox(height: 15,), + Container(width: double.infinity, + height: 100,color:Colors.white, + child: Row( + mainAxisSize:MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + + children: [ + + IconButton( + icon: new Image.asset('assets/images/new-design/youtube.png'), + iconSize: 70, + tooltip: 'Youtube', + onPressed: () { + setState(() { + + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 70, + onPressed: () { + setState(() { + + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 70, + onPressed: () { + setState(() { + + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 70, + onPressed: () { + setState(() { + + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + ], + ), + ), + ], + ), + ), + ), + + ), + ); + + } + +} From 24693f2992eafa493dd4b0e586460a44911b0cdf Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Thu, 24 Sep 2020 01:55:18 +0300 Subject: [PATCH 3/5] Contact us --- lib/config/config.dart | 4 +- .../contactus/get_patientI_cprojects.dart | 54 ++++ .../service/contactus/finadus_service.dart | 3 +- .../service/contactus/livechat_service.dart | 39 +++ .../contactus/livechat_view_model.dart | 33 ++ lib/locator.dart | 4 + .../LiveChat/hospitalsLivechat_page.dart | 174 ++++------ .../ContactUs/LiveChat/livechat_page.dart | 121 +++++++ .../LiveChat/pharmaciesLivechat_page.dart | 90 ++++++ .../LiveChat/pharmmciesLivechat_page.dart | 0 .../ContactUs/findus/hospitrals_page.dart | 144 +++++++-- .../ContactUs/findus/pharmacies_page.dart | 297 ++++++++++++------ .../ContactUs/widgets/card_common_contat.dart | 9 +- 13 files changed, 724 insertions(+), 248 deletions(-) create mode 100644 lib/core/model/contactus/get_patientI_cprojects.dart create mode 100644 lib/core/service/contactus/livechat_service.dart create mode 100644 lib/core/viewModels/contactus/livechat_view_model.dart create mode 100644 lib/pages/ContactUs/LiveChat/livechat_page.dart create mode 100644 lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart create mode 100644 lib/pages/ContactUs/LiveChat/pharmmciesLivechat_page.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 0c554090..90c37129 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -64,7 +64,9 @@ const GET_FINDUS_REQUEST= 'Services/Lists.svc/REST/Get_HMG_Locations'; - +///LiveChat +const GET_LIVECHAT_REQUEST= + 'Services/Patients.svc/REST/GetPatientICProjects'; ///Reports diff --git a/lib/core/model/contactus/get_patientI_cprojects.dart b/lib/core/model/contactus/get_patientI_cprojects.dart new file mode 100644 index 00000000..e9a6b712 --- /dev/null +++ b/lib/core/model/contactus/get_patientI_cprojects.dart @@ -0,0 +1,54 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class GetPatientICProjectsModel { + int id; + String projectName; + String projectNameN; + String value; + dynamic languageId; + DateTime createdOn; + String createdBy; + dynamic editedOn; + dynamic editedBy; + bool isActive; + + GetPatientICProjectsModel( + {this.id, + this.projectName, + this.projectNameN, + this.value, + this.languageId, + this.createdOn, + this.createdBy, + this.editedOn, + this.editedBy, + this.isActive}); + + GetPatientICProjectsModel.fromJson(Map json) { + id = json['id']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + value = json['Value']; + languageId = json['LanguageId']; + createdOn = DateUtil.convertStringToDate(json['CreatedOn']); + createdBy = json['CreatedBy']; + editedOn = json['EditedOn']; + editedBy = json['EditedBy']; + isActive = json['IsActive']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + data['Value'] = this.value; + data['LanguageId'] = this.languageId; + data['CreatedOn'] = this.createdOn; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['IsActive'] = this.isActive; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/contactus/finadus_service.dart b/lib/core/service/contactus/finadus_service.dart index dae46666..4086def9 100644 --- a/lib/core/service/contactus/finadus_service.dart +++ b/lib/core/service/contactus/finadus_service.dart @@ -4,8 +4,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart import '../base_service.dart'; class FindusService extends BaseService { - //List AmModelList = List(); - //Map body = Map(); + List FindusModelList = List(); List FindusHospitalModelList = List(); diff --git a/lib/core/service/contactus/livechat_service.dart b/lib/core/service/contactus/livechat_service.dart new file mode 100644 index 00000000..ae8fabc9 --- /dev/null +++ b/lib/core/service/contactus/livechat_service.dart @@ -0,0 +1,39 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; +import '../base_service.dart'; + +class LiveChatService extends BaseService{ + + + + + List LivechatModelList=List(); + + + Map body = Map(); + + + + Future getAllLiveChatOrders() async { + hasError = false; + body['List_PatientICProjects'] =false; + await baseAppClient.post(GET_LIVECHAT_REQUEST, + onSuccess: (dynamic response, int statusCode) { + LivechatModelList.clear(); + + + response['List_PatientICProjects'].forEach((vital) { + + LivechatModelList.add(GetPatientICProjectsModel.fromJson(vital)); + + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + +} \ No newline at end of file diff --git a/lib/core/viewModels/contactus/livechat_view_model.dart b/lib/core/viewModels/contactus/livechat_view_model.dart new file mode 100644 index 00000000..8df4e801 --- /dev/null +++ b/lib/core/viewModels/contactus/livechat_view_model.dart @@ -0,0 +1,33 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; +import 'package:diplomaticquarterapp/core/service/contactus/livechat_service.dart'; +import '../base_view_model.dart'; +import '../../../locator.dart'; + + +class LiveChatViewModel extends BaseViewModel{ + + + + LiveChatService _liveChatService =locator(); + + List get LiveChatModelList=> + + _liveChatService.LivechatModelList; + + + getLiveChatRequestOrders() async { + setState(ViewState.Busy); + + await _liveChatService.getAllLiveChatOrders(); + + if (_liveChatService.hasError) { + error = _liveChatService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + + +} \ No newline at end of file diff --git a/lib/locator.dart b/lib/locator.dart index 6ef9589a..072370b7 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -5,6 +5,7 @@ import 'package:get_it/get_it.dart'; import 'core/service/appointment_rate_service.dart'; import 'core/service/contactus/finadus_service.dart'; +import 'core/service/contactus/livechat_service.dart'; import 'core/service/dashboard_service.dart'; import 'core/service/er/am_service.dart'; import 'core/service/er/er_service.dart'; @@ -21,6 +22,7 @@ import 'core/service/medical/reports_monthly_service.dart'; import 'core/service/medical/vital_sign_service.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; +import 'core/viewModels/contactus/livechat_view_model.dart'; import 'core/viewModels/er/am_request_view_model.dart'; import 'core/viewModels/er/near_hospital_view_model.dart'; import 'core/viewModels/feedback/feedback_view_model.dart'; @@ -73,6 +75,7 @@ void setupLocator() { locator.registerLazySingleton(() => PatientSickLeaveService()); locator.registerLazySingleton(() => MyBalanceService()); locator.registerLazySingleton(() => FindusService()); + locator.registerLazySingleton(() => LiveChatService()); /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -96,5 +99,6 @@ void setupLocator() { locator.registerFactory(() => PatientSickLeaveViewMode()); locator.registerFactory(() => MyBalanceViewModel()); locator.registerFactory(() => FindusViewModel()); + locator.registerFactory(() => LiveChatViewModel()); } diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 96dd5309..e423fa91 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; @@ -6,9 +7,9 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:giffy_dialog/giffy_dialog.dart'; + import 'package:url_launcher/url_launcher.dart'; -import 'package:maps_launcher/maps_launcher.dart'; + @@ -16,29 +17,20 @@ class HospitalsLiveChatPage extends StatefulWidget { @override _HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState(); } -//bool viewObject = true; + class _HospitalsLiveChatPageState extends State { int tappedIndex; +String chat; @override void initState() { super.initState(); - tappedIndex=0; + tappedIndex=-1; + chat=""; } - - // changeStyle(){ - // - // setState(() { - // //viewObject = false ; - // }); - // // print(viewObject); - // } - - - @override Widget build(BuildContext context) { @@ -48,10 +40,26 @@ int tappedIndex; baseViewModel: model, body: SingleChildScrollView( child: Container( - margin: EdgeInsets.only(left: 15,right: 15,top: 70), + margin: EdgeInsets.only(left: 15,right: 15), child: Column( children: [ - ...List.generate(model.LiveChatModelList.length, (index) => Container(//FindusHospitalModelList.length + SizedBox(height: 20,), + Container( + width: double.infinity, + height: 200, + decoration: BoxDecoration( + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/dashboard_top_bg.png'), + fit: BoxFit.cover), + ), + child: Texts('You can now talk directly to the appointments department by chat or request a call back',color: Colors.white,textAlign: TextAlign.center,), + + ), + /////////// + ...List.generate(model.LiveChatModelList.length, (index) => + Container(//FindusHospitalModelList.length + margin: EdgeInsets.only(left: 20, right: 20, bottom: 20), decoration: BoxDecoration( shape: BoxShape.rectangle, border: Border.all(color: Colors.white, width: 0.5), @@ -60,8 +68,10 @@ int tappedIndex; ), child: Padding( + padding: const EdgeInsets.all(8.0), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -70,12 +80,16 @@ int tappedIndex; print(model.LiveChatModelList[index].value); print(model.user.patientID); print(model.user.firstName); + print(model.user.phoneOffice); + //changeStyle(); setState(() { - //viewObject = false ; + tappedIndex=index; + chat="http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"; }); // launch("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=TAMER&PatientID=1231755&MobileNo=537503378&Language=en&WorkGroup=Dubai_Eng_Chat"); + // print("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"); }, child: Row( @@ -83,53 +97,29 @@ int tappedIndex; MainAxisAlignment.end, children: [ + Expanded( child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [ - // InkWell( - // onTap:(){ - // // showDialog( - // // context: context,builder: (_) => AssetGiffyDialog( - // // title: Text(model.FindusHospitalModelList[index].locationName, - // // style: TextStyle( - // // fontSize: 22.0, fontWeight: FontWeight.w600), - // // ),image:Image.network(model.FindusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), - // // buttonCancelText:Text('cancel') , - // // buttonCancelColor: Colors.grey, - // // onlyCancelButton: true, - // // - // // ) ); - // }, - // child: Container( - // width: 70, - // height: 70, - // child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())), - // ), + + Expanded( flex: 4, child: Container( + margin: EdgeInsets.only(left: 5,right: 5), - child: Texts('${model.LiveChatModelList[index].projectName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl + child: Texts('${model.LiveChatModelList[index].projectName}',color:tappedIndex==index ? Colors.white:Colors.black,textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl Expanded( flex: 1, child: Row( children: [ - // IconButton( - // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), - // tooltip: 'Increase volume by 10', - // onPressed: () { - // setState(() { - // MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); - // // _volume += 10; - // }); - // }, - // ), + IconButton( - icon: Icon(Icons.arrow_forward_rounded,color: Colors.black,), - tooltip: 'Increase volume by 10', + icon: Icon(Icons.arrow_forward_rounded,color: tappedIndex==index ? Colors.white:Colors.black,), + tooltip: '', onPressed: () { setState(() { // _volume += 10; @@ -139,6 +129,7 @@ int tappedIndex; ), ], ), + ), @@ -151,8 +142,7 @@ int tappedIndex; ), ) - // Texts('${model.FindusHospitalModelList[index].locationName}'), - //Divider(height: 4.5,color: Colors.grey[500],) + ], @@ -162,64 +152,30 @@ int tappedIndex; ), ) ), - SizedBox(height: 15,), - Container(width: double.infinity, - height: 100,color:Colors.white, - child: Row( - mainAxisSize:MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceAround, - - children: [ - - IconButton( - icon: new Image.asset('assets/images/new-design/youtube.png'), - iconSize: 70, - tooltip: 'Youtube', - onPressed: () { - setState(() { - - launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); - - }); - }, - ), - IconButton( - icon: new Image.asset('assets/images/new-design/linkedin.png'), - tooltip: 'LinkedIn', - iconSize: 70, - onPressed: () { - setState(() { - - launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); - }); - }, - ), - IconButton( - icon: new Image.asset('assets/images/new-design/twitter.png'), - tooltip: 'Twitter', - iconSize: 70, - onPressed: () { - setState(() { - - launch("https://twitter.com/HMG"); - }); - }, - ), - IconButton( - icon: new Image.asset('assets/images/new-design/facebook.png'), - tooltip: 'facebook', - iconSize: 70, - onPressed: () { - setState(() { - - launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); - }); - }, - ), - ], - ), - ), + SizedBox(height: 100,), + + ], + + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.13, + width: double.infinity, + padding: EdgeInsets.all(8.0), + child: Center( + child: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + label: 'ٍStart', + loading: model.state == ViewState.BusyLocal, + onTap: () { + print("chat="+chat); + launch(chat); + }, + ), ), ), ), diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart new file mode 100644 index 00000000..d1b24cd3 --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -0,0 +1,121 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; +import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; +import 'package:diplomaticquarterapp/pages/feedback/status_feedback_page.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'hospitalsLivechat_page.dart'; + +class LiveChatPage extends StatefulWidget { + @override + _LiveChatPageState createState() => _LiveChatPageState(); +} + +class _LiveChatPageState extends State with SingleTickerProviderStateMixin{ + TabController _tabController; + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + @override + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: 'Locations', + body: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight(65.0), + child: Stack( + children: [ + Positioned( + bottom: 1, + left: 0, + right: 0, + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), + child: Container( + color: Theme.of(context) + .scaffoldBackgroundColor + .withOpacity(0.8), + height: 70.0, + ), + ), + ), + Center( + child: Container( + height: 60.0, + margin: EdgeInsets.only(top: 10.0), + width: MediaQuery.of(context).size.width * 0.9, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.7), + ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: true, + controller: _tabController, + indicatorWeight: 5.0, + indicatorSize: TabBarIndicatorSize.label, + indicatorColor: Colors.red[800], + labelColor: Theme.of(context).primaryColor, + labelPadding: + EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: Texts(' Hospitals '), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: Texts(' Pharmacies '), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + HospitalsLiveChatPage(),//SendFeedbackPage(), + PhamaciesLiveChatPage() + //StatusFeedbackPage() + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart new file mode 100644 index 00000000..c56123c9 --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart @@ -0,0 +1,90 @@ +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'package:url_launcher/url_launcher.dart'; + +class PhamaciesLiveChatPage extends StatefulWidget { + @override + _PhamaciesLiveChatPageState createState() => _PhamaciesLiveChatPageState(); +} + +class _PhamaciesLiveChatPageState extends State { + int tappedIndex; + String chat; + + @override + void initState() + { + super.initState(); + tappedIndex=-1; + chat=""; + } + + @override + + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getLiveChatRequestOrders(), + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15,right: 15), + child: Column( + children: [ + SizedBox(height: 20,), + Container( + width: double.infinity, + height: 200, + decoration: BoxDecoration( + image: DecorationImage( + image: ExactAssetImage( + ''), + fit: BoxFit.cover), + ), + child: Texts('You can now talk directly to the pharmacist by chat or request a call back',color: Colors.black,textAlign: TextAlign.center,), + + ), + /////////// + + SizedBox(height: 100,), + + + ], + + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.13, + width: double.infinity, + padding: EdgeInsets.all(8.0), + child: Center( + child: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + label: 'ٍStart', + loading: model.state == ViewState.BusyLocal, + onTap: () { + print("chat="+chat); + chat="http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1"; + launch(chat); + }, + ), + ), + ), + ), + + ), + ); + + } +} diff --git a/lib/pages/ContactUs/LiveChat/pharmmciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmmciesLivechat_page.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 9b1e2f5f..315fe553 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart'; class HospitalsPage extends StatefulWidget { @@ -32,55 +33,76 @@ class _HospitalsPageState extends State { borderRadius: BorderRadius.all(Radius.circular(5)), color: Colors.white, ), - // margin: EdgeInsets.all(4), + child: Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // SizedBox(height: 8,), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.center, children: [ - Container( - width: 70, - height: 70, - // margin: EdgeInsets.only(right: 15), - child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())), - Container(child: Texts('${model.FindusHospitalModelList[index].locationName}')),//model.cOCItemList[index].cOCTitl - IconButton( - icon: Icon(Icons.person_pin_circle_outlined), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); - // _volume += 10; - }); + InkWell( + onTap:(){ + showDialog( + context: context,builder: (_) => AssetGiffyDialog( + title: Text(model.FindusHospitalModelList[index].locationName, + style: TextStyle( + fontSize: 22.0, fontWeight: FontWeight.w600), + ),image:Image.network(model.FindusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), + buttonCancelText:Text('cancel') , + buttonCancelColor: Colors.grey, + onlyCancelButton: true, + + ) ); }, + child: Container( + width: 70, + height: 70, + child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())), ), - IconButton( - icon: Icon(Icons.phone), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - // _volume += 10; - launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - }); - }, + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: Texts('${model.FindusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, + child: Row( + children: [ + IconButton( + icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); + // _volume += 10; + }); + }, + ), + IconButton( + icon: Icon(Icons.phone,color: Colors.red,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + ], + ), ), - // Texts( - // 'Number :${model.FindusHospitalModelList[index].locationName}', - // variant: 'overline', - // ), + + ], ), ), @@ -93,9 +115,63 @@ class _HospitalsPageState extends State { ), ), )), - + SizedBox(height: 8,), Container(width: double.infinity, - height: 45,color: Colors.red,), + height: 100,color: Colors.white, + child: Row( + mainAxisSize:MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + + children: [ + + IconButton( + icon: new Image.asset('assets/images/new-design/youtube.png'), + iconSize: 70, + tooltip: 'Youtube', + onPressed: () { + setState(() { + + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 70, + onPressed: () { + setState(() { + + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 70, + onPressed: () { + setState(() { + + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 70, + onPressed: () { + setState(() { + + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + ], + ), + ), ], ), ), diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart index 68e3c8bc..f127f842 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -1,4 +1,3 @@ - import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -8,6 +7,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; +import 'package:maps_launcher/maps_launcher.dart'; +import 'package:url_launcher/url_launcher.dart'; class PharmaciesPage extends StatefulWidget { @override @@ -18,116 +19,218 @@ class _PharmaciesPageState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getFindUsRequestOrders(),//model.getCOC(), + onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), builder: (_, model, widget) => AppScaffold( baseViewModel: model, - body: Container( - margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0 ), - padding: EdgeInsets.all(15.0), - child: ListView.builder( - itemCount: model.FindusPharmaciesModelList.length,//model.cOCItemList.length, - itemBuilder: (context, index) => Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: Colors.white, - ), - // margin: EdgeInsets.all(4), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // SizedBox(height: 8,), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 70), + child: Column( + children: [ + ...List.generate( + model.FindusPharmaciesModelList.length, + (index) => Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all(color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(5)), + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - GestureDetector( - onTap: (){ - showDialog( - context: context,builder: (_) => AssetGiffyDialog( - title: Text(model.FindusPharmaciesModelList[index].locationName, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ),image:Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), - - // buttonOkText:Text("LOCATION"), - // buttonOkColor: Colors.grey, - buttonCancelText:Text('cancel') , - buttonCancelColor: Colors.grey, - // onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);}, - // onCancelButtonPressed:(), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + InkWell( + onTap:(){ + showDialog( + context: context,builder: (_) => AssetGiffyDialog( + title: Text(model.FindusPharmaciesModelList[index].locationName, + style: TextStyle( + fontSize: 22.0, fontWeight: FontWeight.w600), + ),image:Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), + buttonCancelText:Text('cancel') , + // buttonCancelText:Text(model.user.projectID) , + buttonCancelColor: Colors.grey, + onlyCancelButton: true, - - - - ) ); - }, - child: Container( - width: 70, - height: 70, - // margin: EdgeInsets.only(right: 15), - child: Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString())), - ), - Container(child: Texts('${model.FindusPharmaciesModelList[index].locationName}')),//model.cOCItemList[index].cOCTitl - IconButton( - icon: Icon(Icons.person_pin_circle_outlined), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - // _volume += 10; - }); - }, + ) ); + }, + child: Container( + width: 70, + height: 70, + child: Image.network(model + .FindusPharmaciesModelList[ + index] + .projectImageURL + .toString())), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 5, right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + '${model.FindusPharmaciesModelList[index].locationName}', + textAlign: TextAlign.start, + ), + SizedBox(height: 4,), + Texts( + '${model.FindusPharmaciesModelList[index].cityName}', + textAlign: TextAlign.center, + ), + ], + ), + ), + ), + //model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, + child: Row( + children: [ + IconButton( + icon: Icon( + Icons + .person_pin_circle_outlined, + color: Colors.red, + ), + tooltip: + 'Increase volume by 10', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates( + double.parse(model + .FindusPharmaciesModelList[ + index] + .latitude), + double.parse(model + .FindusPharmaciesModelList[ + index] + .longitude), + model + .FindusPharmaciesModelList[ + index] + .locationName); + // _volume += 10; + }); + }, + ), + IconButton( + icon: Icon( + Icons.phone, + color: Colors.red, + ), + tooltip: + 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" + + model + .FindusPharmaciesModelList[ + index] + .phoneNumber); + }); + }, + ), + ], + ), + ), + ], + ), + ), + ], ), - IconButton( - icon: Icon(Icons.phone), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - // _volume += 10; - }); - }, - ), - // Texts( - // 'Number :${model.FindusHospitalModelList[index].locationName}', - // variant: 'overline', - // ), + + Divider( + height: 4.5, + color: Colors.grey[500], + ) ], ), ), - // Expanded( - // child: Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Texts('${model.FindusHospitalModelList[index].locationName}'), - // Texts( - // '${model.FindusHospitalModelList[index].locationName}', - // variant: 'overline', - // ), - // ], - // ), - // ), - ], + )), + SizedBox( + height: 8, + ), + Container( + width: double.infinity, + height: 100, + color: Colors.white, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + IconButton( + icon: new Image.asset( + 'assets/images/new-design/youtube.png'), + iconSize: 70, + tooltip: 'Youtube', + onPressed: () { + setState(() { + // _volume += 10; + launch( + "https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset( + 'assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 70, + onPressed: () { + setState(() { + launch( + "https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset( + 'assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 70, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset( + 'assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 70, + onPressed: () { + setState(() { + launch( + "https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, ), - // Texts('${model.FindusHospitalModelList[index].locationName}'), - Divider(height: 4.5,color: Colors.grey[500],) ], ), ), - )), + ], + ), + ), ), ), ); } } - diff --git a/lib/pages/ContactUs/widgets/card_common_contat.dart b/lib/pages/ContactUs/widgets/card_common_contat.dart index 658414e0..9ad74aff 100644 --- a/lib/pages/ContactUs/widgets/card_common_contat.dart +++ b/lib/pages/ContactUs/widgets/card_common_contat.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -56,16 +57,14 @@ class CardCommonContact extends StatelessWidget { } Future navigateToSearch(context, type) async { -//===Switch case=== + if (type == 0) { Navigator.push(context, FadePage(page: FindUsPage())); } else if (type == 1) { Navigator.push(context, FadePage(page: FeedbackHomePage())); } else if (type == 2) { - // Navigator.push( - // context, - // FadePage( - // page: FeedbackHomePage())); + //LiveChatPage + Navigator.push(context, FadePage(page: LiveChatPage())); } } From 24456895ee365eecf778cdff89288a927ed43496 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Thu, 24 Sep 2020 02:00:04 +0300 Subject: [PATCH 4/5] Contact us --- .../LiveChat/hospitalsLivechat_page.dart | 273 ++++++++---------- .../ContactUs/LiveChat/livechat_page.dart | 4 - .../LiveChat/pharmmciesLivechat_page.dart | 0 3 files changed, 127 insertions(+), 150 deletions(-) delete mode 100644 lib/pages/ContactUs/LiveChat/pharmmciesLivechat_page.dart diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index e423fa91..f2536a86 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -10,179 +10,160 @@ import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; - - - class HospitalsLiveChatPage extends StatefulWidget { @override _HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState(); } - class _HospitalsLiveChatPageState extends State { -int tappedIndex; -String chat; - -@override - void initState() - { - super.initState(); - tappedIndex=-1; - chat=""; - } + int tappedIndex; + String chat; @override + void initState() { + super.initState(); + tappedIndex = -1; + chat = ""; + } - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getLiveChatRequestOrders(),//getFindUsRequestOrders(),//model.getCOC(), - builder: (_, model, widget) => AppScaffold( - baseViewModel: model, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only(left: 15,right: 15), - child: Column( - children: [ - SizedBox(height: 20,), - Container( - width: double.infinity, - height: 200, - decoration: BoxDecoration( - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/dashboard_top_bg.png'), - fit: BoxFit.cover), - ), - child: Texts('You can now talk directly to the appointments department by chat or request a call back',color: Colors.white,textAlign: TextAlign.center,), - + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getLiveChatRequestOrders(), + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Column( + children: [ + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + height: 200, + decoration: BoxDecoration( + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/dashboard_top_bg.png'), + fit: BoxFit.cover), ), - /////////// - ...List.generate(model.LiveChatModelList.length, (index) => - Container(//FindusHospitalModelList.length - margin: EdgeInsets.only(left: 20, right: 20, bottom: 20), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: tappedIndex==index ? Colors.red:Colors.white , - ), - - child: Padding( - - padding: const EdgeInsets.all(8.0), - child: Column( - - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - InkWell( - onTap: (){ - print(model.LiveChatModelList[index].value); - print(model.user.patientID); - print(model.user.firstName); - print(model.user.phoneOffice); - - //changeStyle(); - setState(() { - - tappedIndex=index; - chat="http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"; - }); - // launch("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=TAMER&PatientID=1231755&MobileNo=537503378&Language=en&WorkGroup=Dubai_Eng_Chat"); - // print("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"); - - }, - child: Row( - mainAxisAlignment: - MainAxisAlignment.end, - + child: Texts( + 'You can now talk directly to the appointments department by chat or request a call back', + color: Colors.white, + textAlign: TextAlign.center, + ), + ), + /////////// + ...List.generate( + model.LiveChatModelList.length, + (index) => Container( + margin: + EdgeInsets.only(left: 20, right: 20, bottom: 20), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all(color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(5)), + color: tappedIndex == index + ? Colors.red + : Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - - Expanded( + InkWell( + onTap: () { + setState(() { + tappedIndex = index; + chat = + "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"; + }); + }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: - CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.end, children: [ - - - Expanded( - flex: 4, - child: Container( - - margin: EdgeInsets.only(left: 5,right: 5), - child: Texts('${model.LiveChatModelList[index].projectName}',color:tappedIndex==index ? Colors.white:Colors.black,textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl Expanded( - flex: 1, child: Row( - children: [ - - IconButton( - icon: Icon(Icons.arrow_forward_rounded,color: tappedIndex==index ? Colors.white:Colors.black,), - tooltip: '', - onPressed: () { - setState(() { - // _volume += 10; - // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - }); - }, + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 5, right: 5), + child: Texts( + '${model.LiveChatModelList[index].projectName}', + color: + tappedIndex == index + ? Colors.white + : Colors.black, + textAlign: + TextAlign.center, + ))), //model.cOCItemList[index].cOCTitl + Expanded( + flex: 1, + child: Row( + children: [ + IconButton( + icon: Icon( + Icons + .arrow_forward_rounded, + color: + tappedIndex == index + ? Colors.white + : Colors.black, + ), + tooltip: '', + onPressed: () { + setState(() {}); + }, + ), + ], + ), ), ], ), - ), - - - ], ), - ), - + ) ], ), - ) - - - - - ], - - ), - - ), - ) - ), - SizedBox(height: 100,), - - - ], - - ), + ), + )), + SizedBox( + height: 100, + ), + ], ), ), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.13, - width: double.infinity, - padding: EdgeInsets.all(8.0), - child: Center( - child: Container( - height: MediaQuery.of(context).size.height * 0.1, - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - label: 'ٍStart', - loading: model.state == ViewState.BusyLocal, - onTap: () { - print("chat="+chat); - launch(chat); - }, - ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.13, + width: double.infinity, + padding: EdgeInsets.all(8.0), + child: Center( + child: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + label: 'ٍStart', + loading: model.state == ViewState.BusyLocal, + onTap: () { + print("chat=" + chat); + launch(chat); + }, ), ), ), - ), - ); - - } - + ), + ); + } } diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index d1b24cd3..154a03cd 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -1,10 +1,6 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart'; -import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; -import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; -import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; -import 'package:diplomaticquarterapp/pages/feedback/status_feedback_page.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/ContactUs/LiveChat/pharmmciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmmciesLivechat_page.dart deleted file mode 100644 index e69de29b..00000000 From aa66e427b13f97b3a8139695a6049234e0278138 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Thu, 24 Sep 2020 08:48:45 +0300 Subject: [PATCH 5/5] Contact us --- lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index f2536a86..66ad31ee 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -50,7 +50,7 @@ class _HospitalsLiveChatPageState extends State { fit: BoxFit.cover), ), child: Texts( - 'You can now talk directly to the appointments department by chat or request a call back', + 'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :', color: Colors.white, textAlign: TextAlign.center, ),