From 0628aef62af5264c8a165bac6bfd2d82418d4266 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 8 Sep 2020 09:33:57 +0300 Subject: [PATCH 01/21] applied dental change in SearchByClinic --- lib/core/service/client/base_app_client.dart | 30 ++++++++++--------- .../components/SearchByClinic.dart | 1 + .../clinic_services/get_clinic_service.dart | 3 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 8fde2166..4d04378a 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -55,22 +55,24 @@ class BaseAppClient { body['DeviceTypeID'] = DeviceTypeID; - body['PatientType'] = body.containsKey('PatientType') - ? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE - : PATIENT_TYPE; + if(!body.containsKey('IsPublicRequest')) { + 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['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + : PATIENT_TYPE_ID + : PATIENT_TYPE_ID; - if (user != null) { - body['TokenID'] = token; - body['PatientID'] = - body['PatientID'] != null ? body['PatientID'] : user['PatientID']; - body['PatientOutSA'] = user['OutSA']; - body['SessionID'] = getSessionId(token); + if (user != null) { + body['TokenID'] = token; + body['PatientID'] = + body['PatientID'] != null ? body['PatientID'] : user['PatientID']; + body['PatientOutSA'] = user['OutSA']; + body['SessionID'] = getSessionId(token); + } } print("URL : $url"); diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 6b3eff38..9c4d778f 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -223,6 +223,7 @@ class _SearchByClinicState extends State { } }).catchError((err) { print(err); + AppToast.showErrorToast(message: err); }).showProgressBar( text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 8cc1e469..61c5ad59 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -148,7 +148,8 @@ class ClinicListService extends BaseService { "isDentalAllowedBackend": true, "Latitude": lat.toString(), "Longitude": long.toString(), - "DeviceTypeID": 1 + "DeviceTypeID": req.DeviceTypeID, + "IsPublicRequest" : true }; dynamic localRes; From 5400d534dbf5a603503d8278c36d6ffcfa707f07 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Sep 2020 09:27:07 +0300 Subject: [PATCH 02/21] updates for push notifications --- lib/pages/landing/home_page.dart | 2 +- lib/pages/landing/landing_page.dart | 240 +++++++++++++--------------- 2 files changed, 116 insertions(+), 126 deletions(-) diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index d0c8d382..da9d4828 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -360,7 +360,7 @@ class _HomePageState extends State { height: 50, ), SizedBox( - height: 15, + height: 13.5, ), Texts( TranslationBase.of(context) diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index d892be83..315a9aa7 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart'; -import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; @@ -19,13 +18,10 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:provider/provider.dart'; import 'home_page.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; class LandingPage extends StatefulWidget { static bool isOpenCallPage = false; @@ -110,14 +106,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { _firebaseMessaging.setAutoInitEnabled(true); if (Platform.isIOS) { - _firebaseMessaging.requestNotificationPermissions( -// const IosNotificationSettings( -// sound: true, -// badge: true, -// alert: true, -// provisional: true, -// ), - ); + _firebaseMessaging.requestNotificationPermissions(); } _firebaseMessaging.getToken().then((String token) { @@ -126,123 +115,124 @@ class _LandingPageState extends State with WidgetsBindingObserver { checkUserStatus(token); } requestPermissions(); + }).catchError((err) { + print(err); }); //_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"); - // } - // }, - ); + 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) { From a5fd9f53abfb7504f5244acd7000168c141e0651 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Sep 2020 16:10:52 +0300 Subject: [PATCH 03/21] Payment flow implemented in advance payment --- .../service/medical/my_balance_service.dart | 1 + .../medical/balance/advance_payment_page.dart | 28 +++- .../medical/balance/confirm_payment_page.dart | 141 +++++++++++++++++- .../balance/dialogs/ConfirmSMSDialog.dart | 36 +++-- lib/uitl/utils.dart | 8 + 5 files changed, 191 insertions(+), 23 deletions(-) diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart index cbc1be97..27d5d602 100644 --- a/lib/core/service/medical/my_balance_service.dart +++ b/lib/core/service/medical/my_balance_service.dart @@ -88,6 +88,7 @@ class MyBalanceService extends BaseService { onSuccess: (response, statusCode) async { logInTokenID = response['LogInTokenID']; verificationCode = response['VerificationCode']; + print(verificationCode); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index 2b2aad4f..5cef835f 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -1,11 +1,14 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -18,11 +21,10 @@ import 'package:flutter/material.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart'; import '../../../core/model/my_balance/AdvanceModel.dart'; -import 'dialogs/ConfirmSMSDialog.dart'; +import 'confirm_payment_page.dart'; import 'dialogs/SelectBeneficiaryDialog.dart'; import 'dialogs/SelectPatientFamilyDialog.dart'; import 'dialogs/SelectPatientInfoDialog.dart'; -import 'confirm_payment_page.dart'; import 'new_text_Field.dart'; enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } @@ -40,12 +42,17 @@ class _AdvancePaymentPageState extends State { String amount = ""; String email; PatientInfo _selectedPatientInfo; + AuthenticatedUser authenticatedUser; GetAllSharedRecordsByStatusList selectedPatientFamily; AdvanceModel advanceModel = AdvanceModel(); + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUser authUser; + @override void initState() { super.initState(); + getAuthUser(); } @override @@ -253,6 +260,7 @@ class _AdvancePaymentPageState extends State { selectedPaymentMethod: value, patientInfoAndMobileNumber: model.patientInfoAndMobileNumber, + authenticatedUser: authUser, ), ), ); @@ -304,7 +312,6 @@ class _AdvancePaymentPageState extends State { ); } - void confirmSelectPatientDialog(List patientInfoList) { showDialog( context: context, @@ -331,7 +338,8 @@ class _AdvancePaymentPageState extends State { onValueSelected: (value) { setState(() { selectedPatientFamily = value; - _fileTextController.text = selectedPatientFamily.patientID.toString(); + _fileTextController.text = + selectedPatientFamily.patientID.toString(); advanceModel.depositorName = value.patientName; }); }, @@ -369,10 +377,20 @@ class _AdvancePaymentPageState extends State { return TranslationBase.of(context).selectPatientName; } + getAuthUser() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson( + await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + } + String getFamilyMembersName() { if (selectedPatientFamily != null) return selectedPatientFamily.patientName; else - return TranslationBase.of(context).selectFamilyPatientName; + return TranslationBase.of(context).selectFamilyPatientName; } } diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index c7ce32fa..cc5df0a6 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -1,28 +1,41 @@ +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'dialogs/ConfirmSMSDialog.dart'; import 'new_text_Field.dart'; -import 'package:smart_progress_bar/smart_progress_bar.dart'; class ConfirmPaymentPage extends StatelessWidget { final AdvanceModel advanceModel; final PatientInfoAndMobileNumber patientInfoAndMobileNumber; final String selectedPaymentMethod; + MyInAppBrowser browser; + AuthenticatedUser authenticatedUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); ConfirmPaymentPage( {this.advanceModel, this.patientInfoAndMobileNumber, - this.selectedPaymentMethod}); + this.selectedPaymentMethod, + this.authenticatedUser}); @override Widget build(BuildContext context) { @@ -32,9 +45,18 @@ class ConfirmPaymentPage extends StatelessWidget { barrierDismissible: false, child: ConfirmSMSDialog( phoneNumber: patientInfoAndMobileNumber.mobileNumber, - ), - ); + ).then((value) { + print("dialog dismissed"); + print(value); + if (value != null && value) { + AppoitmentAllHistoryResultList appo = + new AppoitmentAllHistoryResultList(); + appo.projectID = patientInfoAndMobileNumber.projectID; + openPayment(selectedPaymentMethod, authenticatedUser, + double.parse(advanceModel.amount), appo); + } + }); } return BaseView( @@ -139,7 +161,8 @@ class ConfirmPaymentPage extends StatelessWidget { onTap: () { model .sendActivationCodeForAdvancePayment( - patientID: int.parse(advanceModel.fileNumber),projectID: advanceModel.hospitalsModel.iD) + patientID: int.parse(advanceModel.fileNumber), + projectID: advanceModel.hospitalsModel.iD) .then((value) { if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(); @@ -174,4 +197,110 @@ class ConfirmPaymentPage extends StatelessWidget { return 'assets/images/new-design/mada.png'; } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, + double amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser( + onExitCallback: onBrowserExit, + appo: appo, + onLoadStartCallback: onBrowserLoadStart); + + browser.openPaymentBrowser( + amount, + "Advance Payment", + Utils.getAdvancePaymentTransID( + authenticatedUser.projectID, authenticatedUser.patientID), + appo.projectID.toString(), + authenticatedUser.emailAddress, + paymentMethod, + authenticatedUser, + browser); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) checkPaymentStatus(appo); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service + .checkPaymentStatus( + Utils.getAppointmentTransID( + appo.projectID, appo.clinicID, appo.appointmentNo), + AppGlobal.context) + .then((res) { + print("Printing Payment Status Reponse!!!!"); + print(res); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + print(err); + }).showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service + .createAdvancePayment(appo, res['Amount'], res['Fort_id'], + res['PaymentMethod'], AppGlobal.context) + .then((res) { + print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); + addAdvancedNumberRequest( + res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString(), + appo); + }).catchError((err) { + print(err); + }).showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, + String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service + .addAdvancedNumberRequest( + advanceNumber, paymentReference, appointmentID, AppGlobal.context) + .then((res) { + print(res); + navigateToHome(AppGlobal.context); + }).catchError((err) { + print(err); + }).showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } + } diff --git a/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart b/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart index 462cc698..8dd2b29e 100644 --- a/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart +++ b/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart @@ -19,7 +19,13 @@ class ConfirmSMSDialog extends StatefulWidget { final AdvanceModel advanceModel; final PatientInfoAndMobileNumber patientInfoAndMobileNumber; final String selectedPaymentMethod; - const ConfirmSMSDialog({Key key, this.phoneNumber,this.advanceModel,this.selectedPaymentMethod,this.patientInfoAndMobileNumber}) + + const ConfirmSMSDialog( + {Key key, + this.phoneNumber, + this.advanceModel, + this.selectedPaymentMethod, + this.patientInfoAndMobileNumber}) : super(key: key); @override @@ -109,7 +115,7 @@ class _ConfirmSMSDialogState extends State { flex: 4, child: Center( child: Texts( - 'SMS', + 'SMS', color: Colors.white, textAlign: TextAlign.center, ))), @@ -140,7 +146,8 @@ class _ConfirmSMSDialogState extends State { Padding( padding: const EdgeInsets.all(8.0), child: Texts( - TranslationBase.of(context).pleaseEnterTheVerificationCode+'[${widget.phoneNumber}]', + TranslationBase.of(context).pleaseEnterTheVerificationCode + + '[${widget.phoneNumber}]', textAlign: TextAlign.center, ), ), @@ -277,7 +284,7 @@ class _ConfirmSMSDialogState extends State { if (model.state == ViewState.ErrorLocal || model.state == ViewState.Error) Container( - margin: EdgeInsets.only(left: 8,right: 8), + margin: EdgeInsets.only(left: 8, right: 8), width: double.maxFinite, child: Texts( model.error, @@ -290,7 +297,9 @@ class _ConfirmSMSDialogState extends State { Padding( padding: const EdgeInsets.all(8.0), child: Texts( - TranslationBase.of(context).theVerificationCodeExpiresIn+' $timerText', + TranslationBase.of(context) + .theVerificationCodeExpiresIn + + ' $timerText', textAlign: TextAlign.center, ), ), @@ -301,7 +310,8 @@ class _ConfirmSMSDialogState extends State { padding: EdgeInsets.all(12), child: SecondaryButton( textColor: Colors.white, - label: TranslationBase.of(context).submit.toUpperCase(), + label: + TranslationBase.of(context).submit.toUpperCase(), onTap: () { submit(model); }, @@ -322,12 +332,14 @@ class _ConfirmSMSDialogState extends State { if (verifyAccountForm.currentState.validate()) { final activationCode = digit1.text + digit2.text + digit3.text + digit4.text; - model.checkActivationCodeForAdvancePayment( - activationCode: activationCode).then((value) { - //TODO complete payment - }).showProgressBar( - text: "Loading", - backgroundColor: Colors.blue.withOpacity(0.6)); + model + .checkActivationCodeForAdvancePayment(activationCode: activationCode) + .then((value) {}) + .showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) + .then((value) { + Navigator.pop(context, true); + }); } } diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 6958e67f..b78e5d11 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -96,6 +96,14 @@ class Utils { appoNo.toString(); } + static String getAdvancePaymentTransID(int projectID, int fileNumber) { + return projectID.toString() + + '-' + + fileNumber.toString() + + '-' + + DateTime.now().millisecondsSinceEpoch.toString(); + } + bool validateIDBox(String value, type) { Pattern pattern = loginIDPattern(type); //r'^\d+(?:\.\d+)?$'; From a4ea5f8e3e963c2b048c741e8a4f0177f1aa0ba4 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 21 Sep 2020 10:41:16 +0300 Subject: [PATCH 04/21] Contact us --- lib/pages/ContactUs/hmg_service.dart | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 lib/pages/ContactUs/hmg_service.dart diff --git a/lib/pages/ContactUs/hmg_service.dart b/lib/pages/ContactUs/hmg_service.dart new file mode 100644 index 00000000..f1ce3bbf --- /dev/null +++ b/lib/pages/ContactUs/hmg_service.dart @@ -0,0 +1,70 @@ +import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; + +import 'package:flutter/material.dart'; +import '../../uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; + +class HmgServicePage extends StatefulWidget { + @override + _HmgServicePageState createState() => _HmgServicePageState(); +} + +class _HmgServicePageState extends State { + + LocationUtils locationUtils; + + @override + void initState() { + locationUtils = + new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance + .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + + super.initState(); + } + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true,//widget.isAppbar, + appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo, + body: Container( + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + Container( + margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: CardCommonContact( + image: 'assets/images/new-design/find_us_icon.png', + text: "Find us", + subText: "", + type: 0, + + ), + ), + Expanded( + child: CardCommonContact( + image: 'assets/images/new-design/feedback_icon.png', + text: "Feedback", + subText: "", + type: 1), + + ) + ], + ), + ), + ], + ), + ), + ); + } +} + From dd3608e9ee7367dd4f3f16d5d24b236262242fb7 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 21 Sep 2020 16:36:13 +0300 Subject: [PATCH 05/21] Contact us --- lib/pages/ContactUs/findus/findus_page.dart | 120 ++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 lib/pages/ContactUs/findus/findus_page.dart diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart new file mode 100644 index 00000000..e8f52cb9 --- /dev/null +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -0,0 +1,120 @@ +import 'dart:ui'; + +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'; + + + + +class FindUsPage extends StatefulWidget { + @override + _FindUsPageState createState() => _FindUsPageState(); +} + +class _FindUsPageState 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: [ + HospitalsPage(),//SendFeedbackPage(), + PharmaciesPage()//StatusFeedbackPage() + ], + ), + ) + ], + ), + ), + ); + } +} From c2b750700578cfc0f858add140782e749cb4b5e6 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 21 Sep 2020 17:34:21 +0300 Subject: [PATCH 06/21] Contact us --- lib/config/config.dart | 5 + .../model/contactus/get_hmg_locations.dart | 80 ++++++++++++++++ .../service/contactus/finadus_service.dart | 38 ++++++++ .../contactus/findus_view_model.dart | 30 ++++++ lib/locator.dart | 4 + .../ContactUs/findus/hospitrals_page.dart | 90 ++++++++++++++++++ .../ContactUs/findus/pharmacies_page.dart | 92 +++++++++++++++++++ lib/pages/ContactUs/hmg_service.dart | 57 ++++++++---- .../ContactUs/widgets/card_common_contat.dart | 72 +++++++++++++++ lib/pages/landing/home_page.dart | 5 +- 10 files changed, 455 insertions(+), 18 deletions(-) create mode 100644 lib/core/model/contactus/get_hmg_locations.dart create mode 100644 lib/core/service/contactus/finadus_service.dart create mode 100644 lib/core/viewModels/contactus/findus_view_model.dart create mode 100644 lib/pages/ContactUs/findus/hospitrals_page.dart create mode 100644 lib/pages/ContactUs/findus/pharmacies_page.dart create mode 100644 lib/pages/ContactUs/widgets/card_common_contat.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 9b910e66..0c554090 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -59,6 +59,11 @@ const GET_AMBULANCE_REQUEST= 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +///FindUs +const GET_FINDUS_REQUEST= + 'Services/Lists.svc/REST/Get_HMG_Locations'; + + diff --git a/lib/core/model/contactus/get_hmg_locations.dart b/lib/core/model/contactus/get_hmg_locations.dart new file mode 100644 index 00000000..89d26951 --- /dev/null +++ b/lib/core/model/contactus/get_hmg_locations.dart @@ -0,0 +1,80 @@ +class GetHMGLocationsModel { + dynamic cityID; + String cityName; + dynamic cityNameN; + dynamic distanceInKilometers; + bool isActive; + String latitude; + int locationID; + String locationName; + dynamic locationNameN; + dynamic locationType; + String longitude; + int pharmacyLocationID; + String phoneNumber; + int projectID; + String projectImageURL; + int setupID; + dynamic sortOrder; + + GetHMGLocationsModel( + {this.cityID, + this.cityName, + this.cityNameN, + this.distanceInKilometers, + this.isActive, + this.latitude, + this.locationID, + this.locationName, + this.locationNameN, + this.locationType, + this.longitude, + this.pharmacyLocationID, + this.phoneNumber, + this.projectID, + this.projectImageURL, + this.setupID, + this.sortOrder}); + + GetHMGLocationsModel.fromJson(Map json) { + cityID = json['CityID']; + cityName = json['CityName']; + cityNameN = json['CityNameN']; + distanceInKilometers = json['DistanceInKilometers']; + isActive = json['IsActive']; + latitude = json['Latitude']; + locationID = json['LocationID']; + locationName = json['LocationName']; + locationNameN = json['LocationNameN']; + locationType = json['LocationType']; + longitude = json['Longitude']; + pharmacyLocationID = json['PharmacyLocationID']; + phoneNumber = json['PhoneNumber']; + projectID = json['ProjectID']; + projectImageURL = json['ProjectImageURL']; + setupID = json['SetupID']; + sortOrder = json['SortOrder']; + } + + Map toJson() { + final Map data = new Map(); + data['CityID'] = this.cityID; + data['CityName'] = this.cityName; + data['CityNameN'] = this.cityNameN; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['IsActive'] = this.isActive; + data['Latitude'] = this.latitude; + data['LocationID'] = this.locationID; + data['LocationName'] = this.locationName; + data['LocationNameN'] = this.locationNameN; + data['LocationType'] = this.locationType; + data['Longitude'] = this.longitude; + data['PharmacyLocationID'] = this.pharmacyLocationID; + data['PhoneNumber'] = this.phoneNumber; + data['ProjectID'] = this.projectID; + data['ProjectImageURL'] = this.projectImageURL; + data['SetupID'] = this.setupID; + data['SortOrder'] = this.sortOrder; + 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 new file mode 100644 index 00000000..cc73f32e --- /dev/null +++ b/lib/core/service/contactus/finadus_service.dart @@ -0,0 +1,38 @@ +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 '../base_service.dart'; + +class FindusService extends BaseService { + //List AmModelList = List(); + //Map body = Map(); + + List FindusModelList = List(); + List FindusHospitalModelList = List(); + List FindusPharmaciesModelList = List(); + Map body = Map(); + + Future getAllFindUsOrders() async { + hasError = false; + + await baseAppClient.post(GET_FINDUS_REQUEST, + onSuccess: (dynamic response, int statusCode) { + FindusModelList.clear(); + FindusHospitalModelList.clear(); + FindusPharmaciesModelList.clear(); + + response['ListHMGLocation'].forEach((vital) { + if (GetHMGLocationsModel.fromJson(vital).locationType == 1) { + FindusHospitalModelList.add(GetHMGLocationsModel.fromJson(vital)); + } else { + FindusPharmaciesModelList.add(GetHMGLocationsModel.fromJson(vital)); + } + // FindusModelList.add( + // GetHMGLocationsModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/viewModels/contactus/findus_view_model.dart b/lib/core/viewModels/contactus/findus_view_model.dart new file mode 100644 index 00000000..800c3106 --- /dev/null +++ b/lib/core/viewModels/contactus/findus_view_model.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/core/service/contactus/finadus_service.dart'; +import '../base_view_model.dart'; +import '../../../locator.dart'; + +class FindusViewModel extends BaseViewModel { + FindusService _findusService = locator(); + + List get FindusModelList => + _findusService.FindusModelList; + + List get FindusHospitalModelList=> + _findusService.FindusHospitalModelList; + + List get FindusPharmaciesModelList=> + _findusService.FindusPharmaciesModelList; + + getFindUsRequestOrders() async { + setState(ViewState.Busy); + + await _findusService.getAllFindUsOrders(); + + if (_findusService.hasError) { + error = _findusService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/locator.dart b/lib/locator.dart index 93715c99..6ef9589a 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:get_it/get_it.dart'; import 'core/service/appointment_rate_service.dart'; +import 'core/service/contactus/finadus_service.dart'; import 'core/service/dashboard_service.dart'; import 'core/service/er/am_service.dart'; import 'core/service/er/er_service.dart'; @@ -19,6 +20,7 @@ import 'core/service/medical/radiology_service.dart'; 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/er/am_request_view_model.dart'; import 'core/viewModels/er/near_hospital_view_model.dart'; import 'core/viewModels/feedback/feedback_view_model.dart'; @@ -70,6 +72,7 @@ void setupLocator() { locator.registerLazySingleton(() => PatientSickLeaveService()); locator.registerLazySingleton(() => MyBalanceService()); + locator.registerLazySingleton(() => FindusService()); /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -92,5 +95,6 @@ void setupLocator() { locator.registerFactory(() => AmRequestViewModel()); locator.registerFactory(() => PatientSickLeaveViewMode()); locator.registerFactory(() => MyBalanceViewModel()); + locator.registerFactory(() => FindusViewModel()); } diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart new file mode 100644 index 00000000..5f26517a --- /dev/null +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -0,0 +1,90 @@ + +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_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'; + +class HospitalsPage extends StatefulWidget { + @override + _HospitalsPageState createState() => _HospitalsPageState(); +} + +class _HospitalsPageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + 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.FindusHospitalModelList.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, + 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 + // Texts( + // 'Number :${model.FindusHospitalModelList[index].locationName}', + // variant: 'overline', + // ), + ], + ), + ), + // Expanded( + // child: Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Texts('${model.FindusHospitalModelList[index].locationName}'), + // Texts( + // '${model.FindusHospitalModelList[index].locationName}', + // variant: 'overline', + // ), + // ], + // ), + // ), + ], + ), + // Texts('${model.FindusHospitalModelList[index].locationName}'), + Divider(height: 4.5,color: Colors.grey[500],) + ], + ), + ), + )), + ), + ), + );; + } +} diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart new file mode 100644 index 00000000..21e94897 --- /dev/null +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -0,0 +1,92 @@ + +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'; +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'; + +class PharmaciesPage extends StatefulWidget { + @override + _PharmaciesPageState createState() => _PharmaciesPageState(); +} + +class _PharmaciesPageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + 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, + children: [ + 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 + // Texts( + // 'Number :${model.FindusHospitalModelList[index].locationName}', + // variant: 'overline', + // ), + ], + ), + ), + // Expanded( + // child: Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Texts('${model.FindusHospitalModelList[index].locationName}'), + // Texts( + // '${model.FindusHospitalModelList[index].locationName}', + // variant: 'overline', + // ), + // ], + // ), + // ), + ], + ), + // Texts('${model.FindusHospitalModelList[index].locationName}'), + Divider(height: 4.5,color: Colors.grey[500],) + ], + ), + ), + )), + ), + ), + ); + } +} + diff --git a/lib/pages/ContactUs/hmg_service.dart b/lib/pages/ContactUs/hmg_service.dart index f1ce3bbf..4f19e8f8 100644 --- a/lib/pages/ContactUs/hmg_service.dart +++ b/lib/pages/ContactUs/hmg_service.dart @@ -35,31 +35,54 @@ class _HmgServicePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: CardCommonContact( - image: 'assets/images/new-design/find_us_icon.png', - text: "Find us", + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: CardCommonContact( + image: 'assets/images/new-design/find_us_icon.png', + text: "Find us", + subText: "", + type: 0, + + ), + ), + Expanded( + child: CardCommonContact( + image: 'assets/images/new-design/feedback_icon.png', + text: "Feedback", subText: "", - type: 0, + type: 1), + + ), + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: CardCommonContact( + image: 'assets/images/new-design/live_chat_icon.png', + text: "Live Chat", + subText: "Service", + type: 2, - ), ), - Expanded( + ), + Expanded( + child: Opacity( + opacity: 0, child: CardCommonContact( image: 'assets/images/new-design/feedback_icon.png', text: "Feedback", subText: "", - type: 1), + type: 3), + ), - ) - ], - ), + ), + ], ), ], ), diff --git a/lib/pages/ContactUs/widgets/card_common_contat.dart b/lib/pages/ContactUs/widgets/card_common_contat.dart new file mode 100644 index 00000000..658414e0 --- /dev/null +++ b/lib/pages/ContactUs/widgets/card_common_contat.dart @@ -0,0 +1,72 @@ +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'; +import 'package:flutter/material.dart'; + +class CardCommonContact extends StatelessWidget { + final image; + final text; + final subText; + final type; + const CardCommonContact( + {@required this.image, + @required this.text, + @required this.subText, + @required this.type}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + navigateToSearch(context, this.type); + }, + child: Container( + margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), + decoration: BoxDecoration(boxShadow: [ + BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0) + ], borderRadius: BorderRadius.circular(10), color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), + child: Text(this.text, + overflow: TextOverflow.clip, + style: TextStyle( + color: new Color(0xFFc5272d), + letterSpacing: 1.0, + fontSize: 20.0)), + ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), + child: Text(this.subText, + overflow: TextOverflow.clip, + style: TextStyle( + color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), + ), + Container( + alignment: Alignment.bottomRight, + margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0), + child: Image.asset(this.image, width: 60.0, height: 60.0), + ), + ], + ), + ), + ); + } + + 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())); + + } + } +} diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 6e8d5fce..7a2d27b7 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/hmg_service.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; @@ -609,8 +610,10 @@ class _HomePageState extends State { ), DashboardItem( onTap: () { + // Navigator.push( + // context, FadePage(page: FeedbackHomePage())); Navigator.push( - context, FadePage(page: FeedbackHomePage())); + context, FadePage(page: HmgServicePage())); }, child: Container( width: double.infinity, From 571023e521b1dc43aab598191b89ff43037cca87 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 21 Sep 2020 18:08:39 +0300 Subject: [PATCH 07/21] Contact us --- .../ContactUs/findus/pharmacies_page.dart | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart index 21e94897..68e3c8bc 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -7,6 +7,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'; class PharmaciesPage extends StatefulWidget { @override @@ -50,12 +51,52 @@ class _PharmaciesPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: 70, - height: 70, - // margin: EdgeInsets.only(right: 15), - child: Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString())), + 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:(), + + + + + ) ); + }, + 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; + }); + }, + ), + IconButton( + icon: Icon(Icons.phone), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + }); + }, + ), // Texts( // 'Number :${model.FindusHospitalModelList[index].locationName}', // variant: 'overline', From c2cfea736010acb15aaeb21c3b8eb9f6f13b6b23 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 22 Sep 2020 10:41:55 +0300 Subject: [PATCH 08/21] Contact us --- .../ContactUs/findus/hospitrals_page.dart | 146 ++++++----- lib/pages/landing/landing_page.dart | 226 +++++++++--------- 2 files changed, 195 insertions(+), 177 deletions(-) diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 5f26517a..9b1e2f5f 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -6,7 +6,8 @@ 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'; +import 'package:maps_launcher/maps_launcher.dart'; class HospitalsPage extends StatefulWidget { @override _HospitalsPageState createState() => _HospitalsPageState(); @@ -19,72 +20,89 @@ class _HospitalsPageState extends State { 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.FindusHospitalModelList.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, - 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 - // Texts( - // 'Number :${model.FindusHospitalModelList[index].locationName}', - // variant: 'overline', - // ), - ], + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15,right: 15,top: 70), + child: Column( + children: [ + ...List.generate(model.FindusHospitalModelList.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, + ), + // 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, + 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; + }); + }, + ), + IconButton( + icon: Icon(Icons.phone), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + + // Texts( + // 'Number :${model.FindusHospitalModelList[index].locationName}', + // variant: 'overline', + // ), + ], + ), ), - ), - // Expanded( - // child: Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Texts('${model.FindusHospitalModelList[index].locationName}'), - // Texts( - // '${model.FindusHospitalModelList[index].locationName}', - // variant: 'overline', - // ), - // ], - // ), - // ), - ], - ), - // Texts('${model.FindusHospitalModelList[index].locationName}'), - Divider(height: 4.5,color: Colors.grey[500],) - ], + + ], + ), + // Texts('${model.FindusHospitalModelList[index].locationName}'), + Divider(height: 4.5,color: Colors.grey[500],) + ], + ), ), - ), - )), + )), + + Container(width: double.infinity, + height: 45,color: Colors.red,), + ], + ), + ), ), + ), - );; + ); + } } 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) { From 6aa6b85f4beb3ef589a4acfe897eab942aeb0654 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 22 Sep 2020 12:18:10 +0300 Subject: [PATCH 09/21] Contact us --- lib/core/service/contactus/finadus_service.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/service/contactus/finadus_service.dart b/lib/core/service/contactus/finadus_service.dart index cc73f32e..dae46666 100644 --- a/lib/core/service/contactus/finadus_service.dart +++ b/lib/core/service/contactus/finadus_service.dart @@ -27,8 +27,7 @@ class FindusService extends BaseService { } else { FindusPharmaciesModelList.add(GetHMGLocationsModel.fromJson(vital)); } - // FindusModelList.add( - // GetHMGLocationsModel.fromJson(vital)); + }); }, onFailure: (String error, int statusCode) { hasError = true; From 3c5adc0a1d6b19289e54e904a757e9105bf68d9d Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 23 Sep 2020 16:15:05 +0300 Subject: [PATCH 10/21] 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 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 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 11/21] 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 12/21] 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 13/21] 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 14/21] 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, ), From 5f981c9248bed76375323e7fb0a624dfbf91e79a Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 27 Sep 2020 13:17:56 +0300 Subject: [PATCH 15/21] Contact us --- lib/pages/ContactUs/findus/findus_page.dart | 10 ++++++---- lib/pages/ContactUs/findus/hospitrals_page.dart | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index e8f52cb9..f9e154f9 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -60,12 +60,12 @@ class _FindUsPageState extends State with SingleTickerProviderStateM child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.9, + width: MediaQuery.of(context).size.width *0.92,// 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.7), + width: 0.9),//width: 0.7 ), color: Colors.white), child: Center( @@ -73,11 +73,13 @@ class _FindUsPageState extends State with SingleTickerProviderStateM isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + //indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, + indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 315fe553..292a9106 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -23,6 +23,7 @@ class _HospitalsPageState extends State { baseViewModel: model, body: SingleChildScrollView( child: Container( + // margin: EdgeInsets.only(left: 15,right: 15,top: 70), margin: EdgeInsets.only(left: 15,right: 15,top: 70), child: Column( children: [ @@ -143,7 +144,7 @@ class _HospitalsPageState extends State { onPressed: () { setState(() { - launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); }); }, ), From 97d0c439c7aeeff3aff27f2984c2e181b2621154 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 27 Sep 2020 14:46:01 +0300 Subject: [PATCH 16/21] Contact us --- assets/images/new-design/call.png | Bin 0 -> 2160 bytes assets/images/new-design/navigate.png | Bin 0 -> 2623 bytes lib/pages/ContactUs/findus/hospitrals_page.dart | 6 ++++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 assets/images/new-design/call.png create mode 100644 assets/images/new-design/navigate.png diff --git a/assets/images/new-design/call.png b/assets/images/new-design/call.png new file mode 100644 index 0000000000000000000000000000000000000000..cf6713cb881cf8a9cb0155594b81dc8ac5caa0db GIT binary patch literal 2160 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 literal 0 HcmV?d00001 diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 292a9106..3af46f36 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -79,7 +79,8 @@ class _HospitalsPageState extends State { child: Row( children: [ IconButton( - icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), + // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), + icon:new Image.asset('assets/images/new-design/navigate.png'), tooltip: 'Increase volume by 10', onPressed: () { setState(() { @@ -89,7 +90,8 @@ class _HospitalsPageState extends State { }, ), IconButton( - icon: Icon(Icons.phone,color: Colors.red,), + // icon: Icon(Icons.phone,color: Colors.red,), + icon:new Image.asset('assets/images/new-design/call.png'), tooltip: 'Increase volume by 10', onPressed: () { setState(() { From 50d862b076e696466630a0536f9b4755a84390b6 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 27 Sep 2020 15:56:17 +0300 Subject: [PATCH 17/21] Contact us --- lib/pages/ContactUs/findus/findus_page.dart | 150 +++---- .../ContactUs/findus/hospitrals_page.dart | 210 +++++----- .../ContactUs/findus/pharmacies_page.dart | 386 +++++++++--------- 3 files changed, 378 insertions(+), 368 deletions(-) diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index f9e154f9..3b58ea3b 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -1,7 +1,9 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.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'; @@ -33,89 +35,93 @@ class _FindUsPageState extends State with SingleTickerProviderStateM @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, + return BaseView( + onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), + builder: (_,model,w)=> AppScaffold( + isShowAppBar: true, + appBarTitle: 'Locations', + baseViewModel: model, + 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.92,// 0.9, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.9),//width: 0.7 - ), - color: Colors.white), - child: Center( - child: TabBar( - isScrollable: true, - controller: _tabController, - indicatorWeight: 5.0, - //indicatorSize: TabBarIndicatorSize.label, - indicatorSize: TabBarIndicatorSize.tab, + Center( + child: Container( + height: 60.0, + margin: EdgeInsets.only(top: 10.0), + width: MediaQuery.of(context).size.width *0.92,// 0.9, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.9),//width: 0.7 + ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: true, + controller: _tabController, + indicatorWeight: 5.0, + //indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, - indicatorColor: Colors.red[800], - labelColor: Theme.of(context).primaryColor, - labelPadding: - EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: Texts(' Hospitals '), + indicatorColor: Colors.red[800], + labelColor: Theme.of(context).primaryColor, + labelPadding: + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.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 '), + 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: [ + HospitalsPage(findusHospitalModelList: model.FindusHospitalModelList,),//SendFeedbackPage(), + PharmaciesPage(findusPharmaciesModelList: model.FindusPharmaciesModelList,)//StatusFeedbackPage() + ], + ), + ) ], ), ), - body: Column( - children: [ - Expanded( - child: TabBarView( - physics: BouncingScrollPhysics(), - controller: _tabController, - children: [ - HospitalsPage(),//SendFeedbackPage(), - PharmaciesPage()//StatusFeedbackPage() - ], - ), - ) - ], - ), ), ); } diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 3af46f36..6e490872 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -1,4 +1,5 @@ +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; @@ -10,6 +11,11 @@ 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 { + + final List findusHospitalModelList; + + HospitalsPage({Key key, this.findusHospitalModelList}); + @override _HospitalsPageState createState() => _HospitalsPageState(); } @@ -17,110 +23,113 @@ class HospitalsPage extends StatefulWidget { class _HospitalsPageState extends State { @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getFindUsRequestOrders(),//model.getCOC(), - builder: (_, model, widget) => AppScaffold( - baseViewModel: model, - body: SingleChildScrollView( - child: Container( - // margin: EdgeInsets.only(left: 15,right: 15,top: 70), - margin: EdgeInsets.only(left: 15,right: 15,top: 70), - child: Column( - children: [ - ...List.generate(model.FindusHospitalModelList.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: [ - 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.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, - - ) ); - }, + return AppScaffold( + body: SingleChildScrollView( + child: Container( + // margin: EdgeInsets.only(left: 15,right: 15,top: 70), + margin: EdgeInsets.only(left: 15,right: 15,top: 70), + child: Column( + children: [ + ...List.generate(widget.findusHospitalModelList.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, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + InkWell( + onTap:(){ + showDialog( + context: context,builder: (_) => AssetGiffyDialog( + title: Text(widget.findusHospitalModelList[index].locationName, + style: TextStyle( + fontSize: 22.0, fontWeight: FontWeight.w600), + ),image:Image.network(widget.findusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), + buttonCancelText:Text('cancel') , + buttonCancelColor: Colors.grey, + onlyCancelButton: true, + + ) ); + }, + child: Container( + width: 70, + height: 70, + child: Image.network(widget.findusHospitalModelList[index].projectImageURL.toString())), + ), + Expanded( + flex: 4, 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.FindusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl - Expanded( - flex: 2, - child: Row( - children: [ - IconButton( + margin: EdgeInsets.only(left: 5,right: 5,top: 10,bottom: 1), + child: Texts('${widget.findusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: + CrossAxisAlignment.center, + + children: [ + IconButton( // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), - icon:new Image.asset('assets/images/new-design/navigate.png'), - 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,), - icon:new Image.asset('assets/images/new-design/call.png'), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - // _volume += 10; - launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - }); - }, - ), - ], - ), + icon:new Image.asset('assets/images/new-design/navigate.png'), + tooltip: '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates(double.parse(widget.findusHospitalModelList[index].latitude),double.parse(widget.findusHospitalModelList[index].longitude),widget.findusHospitalModelList[index].locationName); + + }); + }, + ), + IconButton( + // icon: Icon(Icons.phone,color: Colors.red,), + icon:new Image.asset('assets/images/new-design/call.png'), + tooltip: '', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" +widget.findusHospitalModelList[index].phoneNumber); + }); + }, + ), + ], ), + ), - ], - ), + ], ), + ), - ], - ), - // Texts('${model.FindusHospitalModelList[index].locationName}'), - Divider(height: 4.5,color: Colors.grey[500],) - ], - ), + ], + ), + // Texts('${model.FindusHospitalModelList[index].locationName}'), + Divider(height: 4.5,color: Colors.grey[500],) + ], ), - )), - SizedBox(height: 8,), - Container(width: double.infinity, - height: 100,color: Colors.white, + ), + )), + SizedBox(height: 8,), + Container(width: double.infinity, + height: 100,color: Colors.white, child: Row( mainAxisSize:MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -128,7 +137,7 @@ class _HospitalsPageState extends State { children: [ IconButton( - icon: new Image.asset('assets/images/new-design/youtube.png'), + icon: new Image.asset('assets/images/new-design/youtube.png'), iconSize: 70, tooltip: 'Youtube', onPressed: () { @@ -157,7 +166,7 @@ class _HospitalsPageState extends State { onPressed: () { setState(() { - launch("https://twitter.com/HMG"); + launch("https://twitter.com/HMG"); }); }, ), @@ -168,19 +177,18 @@ class _HospitalsPageState extends State { onPressed: () { setState(() { - launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + 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 f127f842..40799f17 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; @@ -11,6 +12,9 @@ import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; class PharmaciesPage extends StatefulWidget { + final List findusPharmaciesModelList; + + PharmaciesPage({Key key, this.findusPharmaciesModelList}); @override _PharmaciesPageState createState() => _PharmaciesPageState(); } @@ -18,216 +22,208 @@ class PharmaciesPage extends StatefulWidget { class _PharmaciesPageState extends State { @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.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.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: [ - Row( + return AppScaffold( + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 70), + child: Column( + children: [ + ...List.generate( + widget.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: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Row( mainAxisAlignment: - MainAxisAlignment.spaceBetween, + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ + InkWell( + onTap:(){ + showDialog( + context: context,builder: (_) => AssetGiffyDialog( + title: Text(widget.findusPharmaciesModelList[index].locationName, + style: TextStyle( + fontSize: 22.0, fontWeight: FontWeight.w600), + ), + image:widget.findusPharmaciesModelList[index].projectImageURL!= null? Image.network(widget.findusPharmaciesModelList[index].projectImageURL, fit: BoxFit.cover,): Image.network('https://hmgwebservices.com/Images/Hospitals/15.jpg', fit: BoxFit.cover,) , + buttonCancelText:Text('cancel') , + // buttonCancelText:Text(model.user.projectID) , + buttonCancelColor: Colors.grey, + onlyCancelButton: true, + + ) ); + }, + child: Container( + width: 70, + height: 70, + child: + Image.network(widget.findusPharmaciesModelList[index].projectImageURL!= null? widget.findusPharmaciesModelList[index].projectImageURL.toString(): 'https://hmgwebservices.com/Images/Hospitals/15.jpg') ), + ), Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 5, right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + '${widget.findusPharmaciesModelList[index].locationName}', + textAlign: TextAlign.start, + ), + SizedBox(height: 4,), + Texts( + '${widget.findusPharmaciesModelList[index].cityName}', + textAlign: TextAlign.center, + ), + ], + ), + ), + ), + //model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, 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, - - ) ); + children: [ + IconButton( + // icon: Icon( + // Icons + // .person_pin_circle_outlined, + // color: Colors.red, + // ), + icon:new Image.asset('assets/images/new-design/navigate.png'), + tooltip: + '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates( + double.parse(widget.findusPharmaciesModelList[ + index] + .latitude), + double.parse(widget.findusPharmaciesModelList[ + index] + .longitude), + widget.findusPharmaciesModelList[ + index] + .locationName); + // _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, + // color: Colors.red, + // ), + icon:new Image.asset('assets/images/new-design/call.png'), + tooltip: + 'I', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" + + widget.findusPharmaciesModelList[ + index] + .phoneNumber); + }); + }, ), ], ), ), ], ), - - Divider( - height: 4.5, - color: Colors.grey[500], - ) - ], - ), + ), + ], ), - )), - 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"); - }); - }, + + Divider( + height: 4.5, + color: Colors.grey[500], + ) + ], ), - ], - ), + ), + )), + 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.linkedin.com/company/drsulaiman-alhabib-medical-group"); + }); + }, + ), + 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 5ce252d296866a4f2f67afff34340d32269fdba5 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 27 Sep 2020 17:03:05 +0300 Subject: [PATCH 18/21] Contact us --- .../LiveChat/hospitalsLivechat_page.dart | 180 ++++++++++-------- .../ContactUs/LiveChat/livechat_page.dart | 10 +- 2 files changed, 105 insertions(+), 85 deletions(-) diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 66ad31ee..0c17e637 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -36,110 +36,124 @@ class _HospitalsLiveChatPageState extends State { child: Container( margin: EdgeInsets.only(left: 15, right: 15), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, 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\n \nChoose Hospital :', - color: Colors.white, - textAlign: TextAlign.center, - ), - ), - /////////// - ...List.generate( - model.LiveChatModelList.length, - (index) => Container( - margin: - EdgeInsets.only(left: 20, right: 20, bottom: 20), + Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + + children: [ + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + height: 200, 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, + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/dashboard_top_bg.png'), + fit: BoxFit.cover), ), child: Padding( padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - 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.end, + child: Texts( + 'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :', + color: Colors.white, + textAlign: TextAlign.start, + ), + ), + ), + SizedBox(height: MediaQuery.of(context).size.height*0.85,), + + SizedBox( + height: 100, + ), + ], + ), + Positioned( + left: 13, + right: 13, + top:200, + child: Container(width: double.maxFinite, + child: Column( + children: [ + ...List.generate( + model.LiveChatModelList.length, + (index) => Container( + margin: + EdgeInsets.only(left: 0, right: 0, 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( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - crossAxisAlignment: - CrossAxisAlignment.center, + 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, children: [ + SizedBox(width: 20,), 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, + tappedIndex == index + ? Colors.white + : Colors.black, textAlign: - TextAlign.center, + 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(() {}); - }, - ), - ], + IconButton( + icon: Icon( + Icons + .arrow_forward_rounded, + color: + tappedIndex == index + ? Colors.white + : Colors.black, ), + tooltip: '', + onPressed: () { + setState(() {}); + }, ), ], ), - ), + ) ], ), - ) - ], - ), - ), - )), - SizedBox( - height: 100, + ), + )), + ], + ),), + ), + ], ), + Container( + height: MediaQuery.of(context).size.height * 0.20, + width: double.maxFinite, + ) ], ), ), @@ -167,3 +181,7 @@ class _HospitalsLiveChatPageState extends State { ); } } + + + + diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index 154a03cd..20cd1181 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -56,12 +56,12 @@ class _LiveChatPageState extends State with SingleTickerProviderSt child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.9, + width: MediaQuery.of(context).size.width *0.92,// 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.7), + width: 0.9),//width: 0.7 ), color: Colors.white), child: Center( @@ -69,11 +69,13 @@ class _LiveChatPageState extends State with SingleTickerProviderSt isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + //indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, + indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( From 7c48a6f16afcfa5ca73d8e2c0b433c0afd1fcbfd Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 27 Sep 2020 17:47:45 +0300 Subject: [PATCH 19/21] Contact us --- .../LiveChat/hospitalsLivechat_page.dart | 159 +++++----- .../ContactUs/LiveChat/livechat_page.dart | 12 +- .../LiveChat/pharmaciesLivechat_page.dart | 39 ++- lib/pages/ContactUs/findus/findus_page.dart | 27 +- .../ContactUs/findus/hospitrals_page.dart | 285 +++++++++-------- .../ContactUs/findus/pharmacies_page.dart | 290 ++++++++++-------- 6 files changed, 455 insertions(+), 357 deletions(-) diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 0c17e637..206a95c4 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -1,4 +1,3 @@ -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'; @@ -42,7 +41,6 @@ class _HospitalsLiveChatPageState extends State { children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ SizedBox( height: 20, @@ -65,8 +63,9 @@ class _HospitalsLiveChatPageState extends State { ), ), ), - SizedBox(height: MediaQuery.of(context).size.height*0.85,), - + SizedBox( + height: MediaQuery.of(context).size.height * 0.85, + ), SizedBox( height: 100, ), @@ -75,78 +74,92 @@ class _HospitalsLiveChatPageState extends State { Positioned( left: 13, right: 13, - top:200, - child: Container(width: double.maxFinite, - child: Column( - children: [ - ...List.generate( - model.LiveChatModelList.length, - (index) => Container( - margin: - EdgeInsets.only(left: 0, right: 0, 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: () { - 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, + top: 200, + child: Container( + width: double.maxFinite, + child: Column( + children: [ + ...List.generate( + model.LiveChatModelList.length, + (index) => Container( + margin: EdgeInsets.only( + left: 0, right: 0, 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: [ - SizedBox(width: 20,), - Expanded( - - child: Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: Texts( - '${model.LiveChatModelList[index].projectName}', + 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, + children: [ + SizedBox( + width: 20, + ), + Expanded( + 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 + IconButton( + icon: Icon( + Icons + .arrow_forward_rounded, color: - tappedIndex == index - ? Colors.white - : Colors.black, - textAlign: - TextAlign.center, - ))), //model.cOCItemList[index].cOCTitl - IconButton( - icon: Icon( - Icons - .arrow_forward_rounded, - color: - tappedIndex == index - ? Colors.white - : Colors.black, + tappedIndex == index + ? Colors.white + : Colors.black, + ), + tooltip: '', + onPressed: () { + setState(() {}); + }, + ), + ], ), - tooltip: '', - onPressed: () { - setState(() {}); - }, - ), + ) ], ), - ) - ], - ), - ), - )), - ], - ),), + ), + )), + ], + ), + ), ), ], ), @@ -181,7 +194,3 @@ class _HospitalsLiveChatPageState extends State { ); } } - - - - diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index 20cd1181..b870234a 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -13,7 +13,8 @@ class LiveChatPage extends StatefulWidget { _LiveChatPageState createState() => _LiveChatPageState(); } -class _LiveChatPageState extends State with SingleTickerProviderStateMixin{ +class _LiveChatPageState extends State + with SingleTickerProviderStateMixin { TabController _tabController; @override void initState() { @@ -26,6 +27,7 @@ class _LiveChatPageState extends State with SingleTickerProviderSt super.dispose(); _tabController.dispose(); } + @override @override Widget build(BuildContext context) { @@ -56,12 +58,12 @@ class _LiveChatPageState extends State with SingleTickerProviderSt child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width *0.92,// 0.9, + width: MediaQuery.of(context).size.width * 0.92, // 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.9),//width: 0.7 + width: 0.9), //width: 0.7 ), color: Colors.white), child: Center( @@ -75,7 +77,7 @@ class _LiveChatPageState extends State with SingleTickerProviderSt indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( @@ -105,7 +107,7 @@ class _LiveChatPageState extends State with SingleTickerProviderSt physics: BouncingScrollPhysics(), controller: _tabController, children: [ - HospitalsLiveChatPage(),//SendFeedbackPage(), + HospitalsLiveChatPage(), //SendFeedbackPage(), PhamaciesLiveChatPage() //StatusFeedbackPage() ], diff --git a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart index c56123c9..cbda0828 100644 --- a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart @@ -20,15 +20,13 @@ class _PhamaciesLiveChatPageState extends State { String chat; @override - void initState() - { + void initState() { super.initState(); - tappedIndex=-1; - chat=""; + tappedIndex = -1; + chat = ""; } @override - Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.getLiveChatRequestOrders(), @@ -36,29 +34,31 @@ class _PhamaciesLiveChatPageState extends State { baseViewModel: model, body: SingleChildScrollView( child: Container( - margin: EdgeInsets.only(left: 15,right: 15), + margin: EdgeInsets.only(left: 15, right: 15), child: Column( children: [ - SizedBox(height: 20,), + SizedBox( + height: 20, + ), Container( width: double.infinity, height: 200, decoration: BoxDecoration( image: DecorationImage( - image: ExactAssetImage( - ''), - fit: BoxFit.cover), + 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, ), - 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,), - - + SizedBox( + height: 100, + ), ], - ), ), ), @@ -74,17 +74,16 @@ class _PhamaciesLiveChatPageState extends State { 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"; + 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/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index 3b58ea3b..9b39de3a 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -4,22 +4,19 @@ import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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'; - - - class FindUsPage extends StatefulWidget { @override _FindUsPageState createState() => _FindUsPageState(); } -class _FindUsPageState extends State with SingleTickerProviderStateMixin{ +class _FindUsPageState extends State + with SingleTickerProviderStateMixin { TabController _tabController; @override void initState() { @@ -32,12 +29,13 @@ class _FindUsPageState extends State with SingleTickerProviderStateM super.dispose(); _tabController.dispose(); } + @override @override Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), - builder: (_,model,w)=> AppScaffold( + builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBarTitle: 'Locations', baseViewModel: model, @@ -65,12 +63,12 @@ class _FindUsPageState extends State with SingleTickerProviderStateM child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width *0.92,// 0.9, + width: MediaQuery.of(context).size.width * 0.92, // 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.9),//width: 0.7 + width: 0.9), //width: 0.7 ), color: Colors.white), child: Center( @@ -84,7 +82,7 @@ class _FindUsPageState extends State with SingleTickerProviderStateM indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( @@ -114,8 +112,13 @@ class _FindUsPageState extends State with SingleTickerProviderStateM physics: BouncingScrollPhysics(), controller: _tabController, children: [ - HospitalsPage(findusHospitalModelList: model.FindusHospitalModelList,),//SendFeedbackPage(), - PharmaciesPage(findusPharmaciesModelList: model.FindusPharmaciesModelList,)//StatusFeedbackPage() + HospitalsPage( + findusHospitalModelList: model.FindusHospitalModelList, + ), //SendFeedbackPage(), + PharmaciesPage( + findusPharmaciesModelList: + model.FindusPharmaciesModelList, + ) //StatusFeedbackPage() ], ), ) diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 6e490872..b883ae41 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -1,4 +1,3 @@ - import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -10,11 +9,11 @@ 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 { - final List findusHospitalModelList; +class HospitalsPage extends StatefulWidget { + final List findusHospitalModelList; - HospitalsPage({Key key, this.findusHospitalModelList}); + HospitalsPage({Key key, this.findusHospitalModelList}); @override _HospitalsPageState createState() => _HospitalsPageState(); @@ -23,161 +22,209 @@ class HospitalsPage extends StatefulWidget { class _HospitalsPageState extends State { @override Widget build(BuildContext context) { - return AppScaffold( body: SingleChildScrollView( child: Container( // margin: EdgeInsets.only(left: 15,right: 15,top: 70), - margin: EdgeInsets.only(left: 15,right: 15,top: 70), + margin: EdgeInsets.only(left: 15, right: 15, top: 70), child: Column( children: [ - ...List.generate(widget.findusHospitalModelList.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, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - InkWell( - onTap:(){ - showDialog( - context: context,builder: (_) => AssetGiffyDialog( - title: Text(widget.findusHospitalModelList[index].locationName, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ),image:Image.network(widget.findusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), - buttonCancelText:Text('cancel') , - buttonCancelColor: Colors.grey, - onlyCancelButton: true, - - ) ); - }, - child: Container( - width: 70, - height: 70, - child: Image.network(widget.findusHospitalModelList[index].projectImageURL.toString())), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only(left: 5,right: 5,top: 10,bottom: 1), - child: Texts('${widget.findusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl - Expanded( - flex: 2, - child: Row( - crossAxisAlignment: - CrossAxisAlignment.center, - - children: [ - IconButton( - // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), - icon:new Image.asset('assets/images/new-design/navigate.png'), - tooltip: '', - onPressed: () { - setState(() { - MapsLauncher.launchCoordinates(double.parse(widget.findusHospitalModelList[index].latitude),double.parse(widget.findusHospitalModelList[index].longitude),widget.findusHospitalModelList[index].locationName); - - }); - }, - ), - IconButton( - // icon: Icon(Icons.phone,color: Colors.red,), - icon:new Image.asset('assets/images/new-design/call.png'), - tooltip: '', - onPressed: () { - setState(() { - // _volume += 10; - launch("tel://" +widget.findusHospitalModelList[index].phoneNumber); - }); - }, - ), - ], + ...List.generate( + widget.findusHospitalModelList.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, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => + AssetGiffyDialog( + title: Text( + widget + .findusHospitalModelList[ + index] + .locationName, + style: TextStyle( + fontSize: 22.0, + fontWeight: + FontWeight + .w600), + ), + image: Image.network( + widget + .findusHospitalModelList[ + index] + .projectImageURL + .toString(), + fit: BoxFit.cover, + ), + buttonCancelText: + Text('cancel'), + buttonCancelColor: + Colors.grey, + onlyCancelButton: true, + )); + }, + child: Container( + width: 70, + height: 70, + child: Image.network(widget + .findusHospitalModelList[ + index] + .projectImageURL + .toString())), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 5, + right: 5, + top: 10, + bottom: 1), + child: Texts( + '${widget.findusHospitalModelList[index].locationName}', + textAlign: TextAlign.center, + ))), //model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + IconButton( + // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), + icon: new Image.asset( + 'assets/images/new-design/navigate.png'), + tooltip: '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates( + double.parse(widget + .findusHospitalModelList[ + index] + .latitude), + double.parse(widget + .findusHospitalModelList[ + index] + .longitude), + widget + .findusHospitalModelList[ + index] + .locationName); + }); + }, + ), + IconButton( + // icon: Icon(Icons.phone,color: Colors.red,), + icon: new Image.asset( + 'assets/images/new-design/call.png'), + tooltip: '', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" + + widget + .findusHospitalModelList[ + index] + .phoneNumber); + }); + }, + ), + ], + ), + ), + ], + ), ), - ), - - - - ], - ), + ], + ), + // Texts('${model.FindusHospitalModelList[index].locationName}'), + Divider( + height: 4.5, + color: Colors.grey[500], + ) + ], ), - - ], - ), - // Texts('${model.FindusHospitalModelList[index].locationName}'), - Divider(height: 4.5,color: Colors.grey[500],) - ], - ), - ), - )), - SizedBox(height: 8,), - Container(width: double.infinity, - height: 100,color: Colors.white, + ), + )), + SizedBox( + height: 8, + ), + Container( + width: double.infinity, + height: 100, + color: Colors.white, child: Row( - mainAxisSize:MainAxisSize.max, + mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - IconButton( - icon: new Image.asset('assets/images/new-design/youtube.png'), + icon: new Image.asset( + 'assets/images/new-design/youtube.png'), iconSize: 70, tooltip: 'Youtube', onPressed: () { setState(() { - - launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); - + launch( + "https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); }); }, ), IconButton( - icon: new Image.asset('assets/images/new-design/linkedin.png'), + icon: new Image.asset( + 'assets/images/new-design/linkedin.png'), tooltip: 'LinkedIn', iconSize: 70, onPressed: () { setState(() { - - launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); + launch( + "https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); }); }, ), IconButton( - icon: new Image.asset('assets/images/new-design/twitter.png'), + 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'), + 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"); + launch( + "https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); }); }, ), @@ -188,8 +235,6 @@ class _HospitalsPageState extends State { ), ), ), - ); - } } diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart index 40799f17..5dc44019 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -12,9 +12,9 @@ import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; class PharmaciesPage extends StatefulWidget { - final List findusPharmaciesModelList; + final List findusPharmaciesModelList; - PharmaciesPage({Key key, this.findusPharmaciesModelList}); + PharmaciesPage({Key key, this.findusPharmaciesModelList}); @override _PharmaciesPageState createState() => _PharmaciesPageState(); } @@ -30,137 +30,177 @@ class _PharmaciesPageState extends State { children: [ ...List.generate( widget.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: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + (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: [ - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - InkWell( - onTap:(){ - showDialog( - context: context,builder: (_) => AssetGiffyDialog( - title: Text(widget.findusPharmaciesModelList[index].locationName, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ), - image:widget.findusPharmaciesModelList[index].projectImageURL!= null? Image.network(widget.findusPharmaciesModelList[index].projectImageURL, fit: BoxFit.cover,): Image.network('https://hmgwebservices.com/Images/Hospitals/15.jpg', fit: BoxFit.cover,) , - buttonCancelText:Text('cancel') , - // buttonCancelText:Text(model.user.projectID) , - buttonCancelColor: Colors.grey, - onlyCancelButton: true, - - ) ); - }, - child: Container( - width: 70, - height: 70, - child: - Image.network(widget.findusPharmaciesModelList[index].projectImageURL!= null? widget.findusPharmaciesModelList[index].projectImageURL.toString(): 'https://hmgwebservices.com/Images/Hospitals/15.jpg') ), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - '${widget.findusPharmaciesModelList[index].locationName}', - textAlign: TextAlign.start, - ), - SizedBox(height: 4,), - Texts( - '${widget.findusPharmaciesModelList[index].cityName}', - textAlign: TextAlign.center, - ), - ], + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => + AssetGiffyDialog( + title: Text( + widget + .findusPharmaciesModelList[ + index] + .locationName, + style: TextStyle( + fontSize: 22.0, + fontWeight: + FontWeight + .w600), + ), + image: widget + .findusPharmaciesModelList[ + index] + .projectImageURL != + null + ? Image.network( + widget + .findusPharmaciesModelList[ + index] + .projectImageURL, + fit: BoxFit.cover, + ) + : Image.network( + 'https://hmgwebservices.com/Images/Hospitals/15.jpg', + fit: BoxFit.cover, + ), + buttonCancelText: + Text('cancel'), + // buttonCancelText:Text(model.user.projectID) , + buttonCancelColor: + Colors.grey, + onlyCancelButton: true, + )); + }, + child: Container( + width: 70, + height: 70, + child: Image.network(widget + .findusPharmaciesModelList[ + index] + .projectImageURL != + null + ? widget + .findusPharmaciesModelList[ + index] + .projectImageURL + .toString() + : 'https://hmgwebservices.com/Images/Hospitals/15.jpg')), ), - ), - ), - //model.cOCItemList[index].cOCTitl - Expanded( - flex: 2, - child: Row( - children: [ - IconButton( - // icon: Icon( - // Icons - // .person_pin_circle_outlined, - // color: Colors.red, - // ), - icon:new Image.asset('assets/images/new-design/navigate.png'), - tooltip: - '', - onPressed: () { - setState(() { - MapsLauncher.launchCoordinates( - double.parse(widget.findusPharmaciesModelList[ - index] - .latitude), - double.parse(widget.findusPharmaciesModelList[ - index] - .longitude), - widget.findusPharmaciesModelList[ - index] - .locationName); - // _volume += 10; - }); - }, + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 5, right: 5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + '${widget.findusPharmaciesModelList[index].locationName}', + textAlign: TextAlign.start, + ), + SizedBox( + height: 4, + ), + Texts( + '${widget.findusPharmaciesModelList[index].cityName}', + textAlign: TextAlign.center, + ), + ], + ), ), - IconButton( - // icon: Icon( - // Icons.phone, - // color: Colors.red, - // ), - icon:new Image.asset('assets/images/new-design/call.png'), - tooltip: - 'I', - onPressed: () { - setState(() { - // _volume += 10; - launch("tel://" + - widget.findusPharmaciesModelList[ - index] - .phoneNumber); - }); - }, + ), + //model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, + child: Row( + children: [ + IconButton( + // icon: Icon( + // Icons + // .person_pin_circle_outlined, + // color: Colors.red, + // ), + icon: new Image.asset( + 'assets/images/new-design/navigate.png'), + tooltip: '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates( + double.parse(widget + .findusPharmaciesModelList[ + index] + .latitude), + double.parse(widget + .findusPharmaciesModelList[ + index] + .longitude), + widget + .findusPharmaciesModelList[ + index] + .locationName); + // _volume += 10; + }); + }, + ), + IconButton( + // icon: Icon( + // Icons.phone, + // color: Colors.red, + // ), + icon: new Image.asset( + 'assets/images/new-design/call.png'), + tooltip: 'I', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" + + widget + .findusPharmaciesModelList[ + index] + .phoneNumber); + }); + }, + ), + ], ), - ], - ), + ), + ], ), - ], - ), + ), + ], ), + Divider( + height: 4.5, + color: Colors.grey[500], + ) ], ), - - Divider( - height: 4.5, - color: Colors.grey[500], - ) - ], - ), - ), - )), + ), + )), SizedBox( height: 8, ), From 9a6eadc3fbba69f3124e7e0b1f4f7255c7a5691b Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 28 Sep 2020 11:07:29 +0300 Subject: [PATCH 20/21] Contact us and virtual tout --- .../all_habib_medical_service_page.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 616b5fd8..70aa5855 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -16,6 +16,7 @@ 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'; +import 'package:url_launcher/url_launcher.dart'; class AllHabibMedicalService extends StatefulWidget { @override @@ -263,12 +264,7 @@ class _AllHabibMedicalServiceState extends State { title: TranslationBase.of(context).parking, ), ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: ParkingPage(), - ), - ), + onTap: () =>launch("https://hmgwebservices.com/vt_mobile/html/index.html"), imageLocation: 'assets/images/new-design/virtual_tour_icon.png', title: 'Virtual Tour', From 43689d19ce76930763c6371971f2bcdd5d151bce Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 28 Sep 2020 16:25:26 +0300 Subject: [PATCH 21/21] Contact us , virtual tout ,News --- .../all_habib_medical_service_page.dart | 19 ++++++---- .../AlHabibMedicalService/my_web_view.dart | 38 +++++++++++++++++++ pubspec.yaml | 5 ++- 3 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 lib/pages/AlHabibMedicalService/my_web_view.dart diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 70aa5855..5ef49ab4 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; @@ -16,7 +17,9 @@ 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'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'package:webview_flutter/webview_flutter.dart'; class AllHabibMedicalService extends StatefulWidget { @override @@ -264,18 +267,20 @@ class _AllHabibMedicalServiceState extends State { title: TranslationBase.of(context).parking, ), ServicesContainer( - onTap: () =>launch("https://hmgwebservices.com/vt_mobile/html/index.html"), + onTap: () => launch( + "https://hmgwebservices.com/vt_mobile/html/index.html"), imageLocation: 'assets/images/new-design/virtual_tour_icon.png', title: 'Virtual Tour', ), ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: ParkingPage(), - ), - ), + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => MyWebView( + title: "HMG News", + selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + ))); + }, imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png', title: 'Latest News', diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart new file mode 100644 index 00000000..e614c8d0 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/my_web_view.dart @@ -0,0 +1,38 @@ +import 'dart:async'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +import 'package:webview_flutter/webview_flutter.dart'; +import 'package:tweet_webview/tweet_webview.dart'; + +class MyWebView extends StatelessWidget { + final String title; + final String selectedUrl; + + final Completer _controller = + Completer(); + + MyWebView({ + @required this.title, + @required this.selectedUrl, + }); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: title, + + body: + WebView( + initialUrl: selectedUrl, + javascriptMode: JavascriptMode.unrestricted, + onWebViewCreated: (WebViewController webViewController) { + _controller.complete(webViewController); + }, + ) + + + ); + } +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 9b9588fd..b5a2444a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,8 +16,9 @@ dependencies: flutter_localizations: sdk: flutter intl: ^0.16.1 - - + # web view + webview_flutter: ^0.3.24 + tweet_webview: ^0.2.2 # http client http: ^0.12.1 connectivity: ^0.4.9