diff --git a/lib/config/config.dart b/lib/config/config.dart index 75a904ea..7270f91e 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -442,6 +442,7 @@ const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/ const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc"; const ADD_HHC_ORDER_RC = "rc/api/HHC/add"; const GET_ALL_HHC_ORDERS_RC = 'rc/api/hhc/list'; +const UPDATE_HHC_ORDER_RC = 'rc/api/hhc/update'; // CMC RC SERVICES const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index bb910f6c..b4c0df07 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -633,7 +633,7 @@ const Map localizedValues = { "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي) ..." }, "email": {"en": "Email", "ar": "البريد الالكتروني"}, - "Book": {"en": "Book", "ar": "احجز"}, + "Book": {"en": "Book", "ar": "حجز"}, "AppointmentLabel": {"en": "Appointment", "ar": "موعد"}, "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"}, "marital-status": {"en": "Marital status", "ar": "الحالة الإجتماعية"}, @@ -1092,7 +1092,7 @@ const Map localizedValues = { "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"}, - "driveThru": {"en": "Drive-Thru", "ar": "من السيارة"}, + "driveThru": {"en": "Drive-Thru", "ar": "من داخل السيارة"}, "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "تتبع السائق"}, "NearestErDesc": { "en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location", @@ -1542,24 +1542,40 @@ const Map localizedValues = { "My_File_Details": {"en": "My File Details", "ar": "تفاصيل ملفي"}, "Ecommerce": {"en": "Ecommerce", "ar": "التجارة الإلكترونية"}, "Family_Files": {"en": "Family Files", "ar": "ملفات العائلة"}, - "My_Child": {"en": "My Child", "ar": "طفلي"}, - "Vaccines": {"en": "Vaccines", "ar": "اللقاحات"}, - "Todo": {"en": "Todo", "ar": "لكى يفعل"}, - "List": {"en": "List", "ar": "قائمة"}, - "Blood": {"en": "Blood", "ar": "دم"}, - "Donation": {"en": "Donation", "ar": "هبة"}, + "My_Child": {"en": "My Child", "ar": "تطعيمات"}, + "Vaccines": {"en": "Vaccines", "ar": "الأطفال"}, + "Todo": {"en": "Todo", "ar": "قائمة"}, + "List": {"en": "List", "ar": "المهام"}, + "Blood": {"en": "Blood", "ar": "التبرع"}, + "Donation": {"en": "Donation", "ar": "بالدم"}, "Health": {"en": "Health", "ar": "الصحة"}, "Calculator": {"en": "Calculator", "ar": "آلة حاسبة"}, "Converter": {"en": "Converter", "ar": "محول"}, "Smart": {"en": "Smart", "ar": "ذكي"}, "Watches": {"en": "Watches", "ar": "ساعات"}, - "Parking": {"en": "Parking", "ar": "موقف سيارات"}, + "parkingTitle2": {"en": "Car parking", "ar": "خدمة"}, + "ParkingSubtitle": {"en": "service", "ar": "مواقف السيارات"}, "Details": {"en": "Details", "ar": "تفاصيل"}, - "Virtual": {"en": "Virtual", "ar": "افتراضية"}, - "News": {"en": "News", "ar": "أخبار"}, - "Latest": {"en": "Latest", "ar": "أحدث"}, - "Tour": {"en": "Tour", "ar": "رحلة"}, + "News": {"en": "News", "ar": "أحدث"}, + "Latest": {"en": "Latest", "ar": "ألاخبار"}, + "Virtual": {"en": "Virtual", "ar": "جولة"}, + "Tour": {"en": "Tour", "ar": "افتراضية"}, "mostViewed": {"en": "Most Viewed", "ar": "الأكثر مشاهدة"}, "newProducts": {"en": "New Products", "ar": "منتجات جديدة"}, "paymentSelected": {"en": "Selected", "ar": "المحدد"}, + "moreNotifications": {"en": "More notifications", "ar": "الإشعارات المزيد"}, + "familyTitle": {"en": "My Family", "ar": "ملفات"}, + "familySubtitle": {"en": "Files", "ar": "العائلة"}, + "liveCareTitle": {"en": "LiveCare", "ar": "خدمة"}, + "liveCareSubtitle": {"en": "Service", "ar": "لايف كير"}, + "pharmacyTitle": {"en": "Al Habib", "ar": "الصيدليات"}, + "pharmacySubtitle": {"en": "Pharmacy", "ar": "الحبيب"}, + "healthCalculatorTitle": {"en": "Health", "ar": "الحاسبات"}, + "healthCalculatorSubtitle": {"en": "Calculators", "ar": "الصحية"}, + "waterTitle": {"en": "Water", "ar": "استهلاك"}, + "waterSubtitle": {"en": "Consumption", "ar": "الماء"}, + "medicalFileTitle2": {"en": "My Medical File", "ar": "تفاصيل"}, + "medicalFileSubtitle": {"en": "Details", "ar": "ملفي الطبي"}, + "healthConvertersTitle": {"en": "Health", "ar": "تحويل"}, + "healthConvertersSubtitle": {"en": "Converters", "ar": "القياسات"}, }; diff --git a/lib/core/service/AlHabibMedicalService/e_referral_service.dart b/lib/core/service/AlHabibMedicalService/e_referral_service.dart index 7fcc5f19..f3791f4b 100644 --- a/lib/core/service/AlHabibMedicalService/e_referral_service.dart +++ b/lib/core/service/AlHabibMedicalService/e_referral_service.dart @@ -22,9 +22,12 @@ class EReferralService extends BaseService { List get allReferral => _allReferral; String _activationCode; String _logInTokenID; + String _referralNumber; String get activationCode => _activationCode; + String get referralNumber => _referralNumber; + bool _isActivationCodeValid = false; bool get isActivationCodeValid => _isActivationCodeValid; @@ -106,6 +109,7 @@ class EReferralService extends BaseService { CREATE_E_REFERRAL /*'Services/Patients.svc/REST/CreateEReferral'*/, onSuccess: (dynamic response, int statusCode) { // TODO Waiting for fix service + _referralNumber = response['ReferralNumber'].toString(); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index 00d44f6a..cd90dae5 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -104,6 +104,16 @@ class HomeHealthCareService extends BaseService { }, body: updatePresOrderRequestModel.toJson()); } + Future updateHHCPresOrderRC(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + hasError = false; + await baseAppClient.post(UPDATE_HHC_ORDER_RC, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: updatePresOrderRequestModel.toJson()); + } + Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async { hasError = false; await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index d27827e4..09b2a73d 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -71,7 +71,8 @@ class HomeHealthCareViewModel extends BaseViewModel { Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { setState(ViewState.Busy); - await _homeHealthCareService.updateHHCPresOrder(updatePresOrderRequestModel); + // await _homeHealthCareService.updateHHCPresOrder(updatePresOrderRequestModel); + await _homeHealthCareService.updateHHCPresOrderRC(updatePresOrderRequestModel); if (_homeHealthCareService.hasError) { error = _homeHealthCareService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart index b1a6441e..ee803b5e 100644 --- a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart +++ b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart @@ -21,7 +21,7 @@ class EReferralViewModel extends BaseViewModel { List get allCities => _eReferralService.allCities; List get allReferral => _eReferralService.allReferral; - + String get referralNumber => _eReferralService.referralNumber; void getRelationTypes() async { setState(ViewState.Busy); diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart index 16f599d7..25efb016 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart @@ -36,6 +36,7 @@ class NewEReferralStepOnePage extends StatefulWidget { class _NewEReferralStepOnePageState extends State { TextEditingController _nameTextController = TextEditingController(); + TextEditingController _requesterRelationTextController = TextEditingController(); GetAllRelationshipTypeResponseModel _selectedRelation; String email; @@ -166,6 +167,11 @@ class _NewEReferralStepOnePageState extends State { ), ), ), + SizedBox( + height: 12, + ), + if (_selectedRelation != null && _selectedRelation.iD == 5) + inputWidget(TranslationBase.of(context).requesterRelationship, "", _requesterRelationTextController, isInputTypeNum: false), ], ), ), @@ -180,7 +186,7 @@ class _NewEReferralStepOnePageState extends State { width: double.infinity, child: DefaultButton( TranslationBase.of(context).next, - (_nameTextController.text.isEmpty || _selectedRelation == null || mobileNo.isEmpty) + (_nameTextController.text.isEmpty || _selectedRelation == null || mobileNo.isEmpty || (_selectedRelation.iD == 5 && _requesterRelationTextController.text.isEmpty)) ? null : () async { Future.delayed(new Duration(milliseconds: 300)).then((value) async { @@ -222,7 +228,8 @@ class _NewEReferralStepOnePageState extends State { Navigator.of(context).pop(); widget.changePageViewIndex(1); widget.createEReferralRequestModel.requesterName = _nameTextController.text; - widget.createEReferralRequestModel.requesterContactNo = _selectedCountry['code'].toString().substring(1) + mobileNo; + widget.createEReferralRequestModel.requesterContactNo = _selectedCountry['code'].toString() + mobileNo; + widget.createEReferralRequestModel.otherRelationship = _requesterRelationTextController.text; widget.createEReferralRequestModel.requesterRelationship = _selectedRelation.iD; } }); diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart index 164d7b50..439a9ec7 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart @@ -7,11 +7,11 @@ import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -22,7 +22,6 @@ 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:font_awesome_flutter/font_awesome_flutter.dart'; import '../dialogs/select_city_dialog.dart'; @@ -111,11 +110,10 @@ class _NewEReferralStepThreePageState extends State { fontWeight: FontWeight.w600, ), ), - ...List.generate( medicalReportImages.length, (index) => Container( - padding: EdgeInsets.only(top: 6,bottom: 6), + padding: EdgeInsets.only(top: 6, bottom: 6), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -154,7 +152,7 @@ class _NewEReferralStepThreePageState extends State { ); }, child: Padding( - padding: EdgeInsets.only(top: 12,bottom: 12), + padding: EdgeInsets.only(top: 12, bottom: 12), child: Text( TranslationBase.of(context).selectAttachment, style: TextStyle( @@ -257,10 +255,8 @@ class _NewEReferralStepThreePageState extends State { Padding( padding: const EdgeInsets.all(5.0), child: Text( - TranslationBase.of(context).insuredPatientReferral, style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600 - ), + TranslationBase.of(context).insuredPatientReferral, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ), ], @@ -297,11 +293,10 @@ class _NewEReferralStepThreePageState extends State { fontWeight: FontWeight.w600, ), ), - ...List.generate( insuredPatientImages.length, (index) => Container( - padding: EdgeInsets.only(top: 6,bottom: 6), + padding: EdgeInsets.only(top: 6, bottom: 6), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -339,7 +334,7 @@ class _NewEReferralStepThreePageState extends State { }); }, child: Padding( - padding: const EdgeInsets.only(top: 12,bottom: 12), + padding: const EdgeInsets.only(top: 12, bottom: 12), child: Text( TranslationBase.of(context).selectAttachment, style: TextStyle( @@ -378,16 +373,23 @@ class _NewEReferralStepThreePageState extends State { this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length != 0 ? insuredPatientImages[0] : null; this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured; // ToDo make the preferred Branch info dynamic - this.widget.createEReferralRequestModel.preferredBranchCode = num.tryParse(projectDropdownValue.split(",")[0]); - this.widget.createEReferralRequestModel.preferredBranchName = projectDropdownValue.split(",")[1]; - this.widget.createEReferralRequestModel.otherRelationship = ""; + this.widget.createEReferralRequestModel.preferredBranchCode = projectDropdownValue != null && projectDropdownValue.isNotEmpty ? num.tryParse(projectDropdownValue.split(",")[0]) : 0; + this.widget.createEReferralRequestModel.preferredBranchName = projectDropdownValue != null && projectDropdownValue.isNotEmpty ? projectDropdownValue.split(",")[1] : ""; + // this.widget.createEReferralRequestModel.otherRelationship = ""; await model.createEReferral(this.widget.createEReferralRequestModel); if (model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); Utils.showErrorToast(model.error); } else { GifLoaderDialogUtils.hideDialog(context); - AppToast.showSuccessToast(message: TranslationBase.of(context).ereferralSaveSuccess); + // AppToast.showSuccessToast(message: TranslationBase.of(context).ereferralSaveSuccess); + showCMCConfirmDialog( + context, + model.referralNumber, + onClick: () { + Navigator.pop(context); + }, + ); } }); }, @@ -469,7 +471,6 @@ class _NewEReferralStepThreePageState extends State { ); } - String getRelationName() { if (_selectedCity != null) return _selectedCity.description; diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart index 9135eda9..57341838 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart @@ -180,7 +180,7 @@ class _NewEReferralStepTowPageState extends State { this.widget.changePageViewIndex(2); this.widget.createEReferralRequestModel.identificationNo = int.parse(_patientIdentificationTextController.text); this.widget.createEReferralRequestModel.fullName = _patientNameTextController.text; - this.widget.createEReferralRequestModel.patientMobileNumber = _selectedCountry['code'].toString().substring(1) + mobileNo; + this.widget.createEReferralRequestModel.patientMobileNumber = _selectedCountry['code'].toString() + mobileNo; this.widget.createEReferralRequestModel.cityCode = _selectedCity.iD.toString(); this.widget.createEReferralRequestModel.cityName = _selectedCity.description; }, diff --git a/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart b/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart index fe920748..1baab531 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart @@ -31,8 +31,7 @@ class _ReferralDetailsState extends State { width: double.infinity, child: Container( decoration: cardRadius(12), - margin: - EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), child: Padding( padding: const EdgeInsets.all(15.0), child: Column( @@ -40,13 +39,7 @@ class _ReferralDetailsState extends State { children: [ Container( margin: EdgeInsets.only(bottom: 10.0), - child: Text( - TranslationBase.of(context).ereferral, - style: TextStyle( - letterSpacing: -0.64, - color: Colors.black, - fontSize: 18.0, - fontWeight: FontWeight.bold)), + child: Text(TranslationBase.of(context).ereferral, style: TextStyle(letterSpacing: -0.64, color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.bold)), ), Container( width: double.infinity, @@ -54,15 +47,10 @@ class _ReferralDetailsState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).referralStatus), + child: _getNormalText(TranslationBase.of(context).referralStatus), ), Expanded( - child: _getNormalText( - projectViewModel.isArabic - ? widget.referral.statusAr - : widget.referral.status, - isBold: true), + child: _getNormalText(projectViewModel.isArabic ? widget.referral.statusAr : widget.referral.status, isBold: true), ) ], ), @@ -74,13 +62,10 @@ class _ReferralDetailsState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).patientName), + child: _getNormalText(TranslationBase.of(context).patientName), ), Expanded( - child: _getNormalText( - widget.referral.patientName, - isBold: true), + child: _getNormalText(widget.referral.patientName, isBold: true), ) ], ), @@ -92,13 +77,10 @@ class _ReferralDetailsState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).referralNumber), + child: _getNormalText(TranslationBase.of(context).referralNumber), ), Expanded( - child: _getNormalText( - widget.referral.referralNumber.toString(), - isBold: true), + child: _getNormalText(widget.referral.referralNumber.toString(), isBold: true), ) ], ), @@ -110,15 +92,10 @@ class _ReferralDetailsState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).referralDate), + child: _getNormalText(TranslationBase.of(context).referralDate), ), Expanded( - child: _getNormalText( - DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDateNoTimeZone( - widget.referral.referralDate)), - isBold: true), + child: _getNormalText(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(widget.referral.referralDate)), isBold: true), ) ], ), @@ -130,13 +107,10 @@ class _ReferralDetailsState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).hospital), + child: _getNormalText(TranslationBase.of(context).hospital), ), Expanded( - child: _getNormalText( - widget.referral.preferredBranchName, - isBold: true), + child: _getNormalText(widget.referral.preferredBranchName ?? "", isBold: true), ) ], ), diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart index c4e82766..b0e98ce4 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -1,17 +1,15 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:provider/provider.dart'; @@ -66,14 +64,14 @@ class _NewHomeHealthCarePageState extends State with Tick @override Widget build(BuildContext context) { - void showConfirmMessage(HomeHealthCareViewModel model, GetOrderDetailByOrderIDResponseModel order) { + void showConfirmMessage(HomeHealthCareViewModel model, GetCMCAllOrdersResponseModel order) { showDialog( context: context, - child: ConfirmCancelOrderDialog( - model: model, + child: ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, onTap: () async { model.setState(ViewState.Busy); - UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.presOrderID, rejectionReason: "", presOrderStatus: 4, editedBy: 3); + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); await model.updateHHCPresOrder(updatePresOrderRequestModel); if (model.state == ViewState.ErrorLocal) { @@ -195,7 +193,7 @@ class _NewHomeHealthCarePageState extends State with Tick if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2) InkWell( onTap: () { - showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]); + showConfirmMessage(widget.model, widget.model.pendingOrder); }, child: Container( padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart index 919c566a..22ffd68f 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart @@ -90,7 +90,7 @@ class OrdersLogDetailsPage extends StatelessWidget { } else if (status == 3) { //completed _color = Color(0xff359846); - } else if (status == 4) { + } else if (status == 4 || status == 6 || status == 7) { //cancel // Rejected _color = Color(0xffD02127); } diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart index 6aff12d7..fc3eebb5 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -48,29 +48,29 @@ class _AllHabibMedicalSevicePage2State extends State initialiseHmgServices(bool isLogin) { hmgServices.clear(); - hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCareTitle, TranslationBase.of(context).liveCareSubtitle, "assets/images/new/Live_Care.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); - hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).findUs, TranslationBase.of(context).reachUs, "assets/images/new/reach_us.svg", isLogin)); - hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFile, TranslationBase.of(context).My_File_Details, "assets/images/new/medical file.svg", isLogin)); - hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointment, "assets/images/new/book appointment.svg", isLogin)); - hmgServices.add(new HmgServices(11, TranslationBase.of(context).online, TranslationBase.of(context).pharmacy, "assets/images/new/Pharmacy.svg", isLogin)); + hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); + hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); - hmgServices.add(new HmgServices(13, TranslationBase.of(context).myFamily, TranslationBase.of(context).Family_Files, "assets/images/new/my family.svg", isLogin)); + hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin)); - hmgServices.add(new HmgServices(17, TranslationBase.of(context).Health, TranslationBase.of(context).Calculator, "assets/images/new/health calculator.svg", isLogin)); - hmgServices.add(new HmgServices(18, TranslationBase.of(context).Health, TranslationBase.of(context).Converter, "assets/images/new/health converter.svg", isLogin)); - hmgServices.add(new HmgServices(19, TranslationBase.of(context).Smart, TranslationBase.of(context).Watches, "assets/images/new/smart watch.svg", isLogin)); - hmgServices.add(new HmgServices(20, TranslationBase.of(context).Parking, TranslationBase.of(context).Details, "assets/images/new/parking details.svg", isLogin)); + hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin)); + hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); + hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin)); + hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin)); hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); - hmgServices.add(new HmgServices(22, TranslationBase.of(context).News, TranslationBase.of(context).Latest, "assets/images/new/latest news.svg", isLogin)); + hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin)); } @override @@ -90,7 +90,7 @@ class _AllHabibMedicalSevicePage2State extends State child: Column( children: [ AspectRatio( - aspectRatio: 1.8, + aspectRatio: 1.9, child: Container( width: double.infinity, height: double.infinity, @@ -106,7 +106,7 @@ class _AllHabibMedicalSevicePage2State extends State ? Color(0xFFFECB50) : Color(0xFF122F48)), child: Padding( - padding: const EdgeInsets.all(30.0), + padding: const EdgeInsets.all(20.0), child: Stack( alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight, children: [ @@ -118,7 +118,7 @@ class _AllHabibMedicalSevicePage2State extends State child: Text( weather, style: TextStyle( - fontSize: 30, + fontSize: 24, letterSpacing: -0.83, fontWeight: FontWeight.bold, color: Colors.white, @@ -134,11 +134,11 @@ class _AllHabibMedicalSevicePage2State extends State color: Colors.white, ), ), - mFlex(1), + mFlex(0), Text( TranslationBase.of(context).healthWeatherIndicators, style: TextStyle( - fontSize: 16, + fontSize: 12, letterSpacing: -0.96, fontWeight: FontWeight.bold, color: Colors.white, @@ -147,7 +147,7 @@ class _AllHabibMedicalSevicePage2State extends State Text( TranslationBase.of(context).healthTipsBasedOnCurrentWeather, style: TextStyle( - fontSize: 12, + fontSize: 10, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, @@ -163,7 +163,7 @@ class _AllHabibMedicalSevicePage2State extends State ); }, child: Padding( - padding: const EdgeInsets.only(top: 8, bottom: 8), + padding: const EdgeInsets.only(top: 0, bottom: 0), child: Text( TranslationBase.of(context).moreDetails, style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline), diff --git a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart index b38e3f63..39264fe8 100644 --- a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart +++ b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart @@ -50,7 +50,7 @@ class _HospitalsPageState extends State { ? SingleChildScrollView( child: Column(children: [ AspectRatio( - aspectRatio: 1.8, + aspectRatio: 2.3, child: Container( width: double.infinity, height: double.infinity, @@ -66,7 +66,7 @@ class _HospitalsPageState extends State { ? Color(0xFFFECB50) : Color(0xFF122F48)), child: Padding( - padding: const EdgeInsets.all(30.0), + padding: const EdgeInsets.all(20.0), child: Stack( alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight, children: [ @@ -78,7 +78,7 @@ class _HospitalsPageState extends State { child: Text( weather, style: TextStyle( - fontSize: 30, + fontSize: 24, letterSpacing: -0.83, fontWeight: FontWeight.bold, color: Colors.white, @@ -94,11 +94,11 @@ class _HospitalsPageState extends State { color: Colors.white, ), ), - mFlex(1), + mFlex(0), Text( TranslationBase.of(context).healthWeatherIndicators, style: TextStyle( - fontSize: 16, + fontSize: 12, letterSpacing: -0.96, fontWeight: FontWeight.bold, color: Colors.white, @@ -107,7 +107,7 @@ class _HospitalsPageState extends State { Text( TranslationBase.of(context).healthTipsBasedOnCurrentWeather, style: TextStyle( - fontSize: 12, + fontSize: 10, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart index 7b699467..6ae318c3 100644 --- a/lib/pages/DrawerPages/notifications/notifications_page.dart +++ b/lib/pages/DrawerPages/notifications/notifications_page.dart @@ -56,7 +56,26 @@ class NotificationsPage extends StatelessWidget { GifLoaderDialogUtils.hideDialog(context); }, child: Center( - child: Image.asset('assets/images/notf.png'), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Image.asset('assets/images/notf.png'), + Icon( + Icons.notifications_active, + color: CustomColors.accentColor, + size: 40, + ), + Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0), + child: Text(TranslationBase.of(context).moreNotifications, style: TextStyle( + color: CustomColors.accentColor, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + decoration: TextDecoration.underline + )), + ), + ], + ), ), ); } @@ -154,91 +173,6 @@ class NotificationsPage extends StatelessWidget { ); }, itemCount: model.notifications.length + 1)), - // ListView( - // children: model.notifications - // .map( - // (notification) => InkWell( - // onTap: () async { - // if (!notification.isRead) { - // model.markAsRead(notification.id); - // } - // Navigator.push( - // context, - // FadePage( - // page: NotificationsDetailsPage( - // notification: notification, - // ))); - // }, - // child: Container( - // width: double.infinity, - // padding: EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // color: notification.isRead ? CustomColors.white : CustomColors.accentColor.withOpacity(0.05), - // border: Border( - // left: BorderSide( - // color: notification.isRead ? Colors.grey[200] : CustomColors.accentColor, - // width: 5.0, - // ), - // ), - // ), - // child: Row( - // children: [ - // Expanded( - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(notification.createdOn)) + " " + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(notification.createdOn), false)), - // SizedBox( - // height: 5, - // ), - // Row( - // children: [ - // Expanded( - // child: Texts(notification.message)), - // if (notification.messageType == "image") - // Icon(FontAwesomeIcons.images, color: CustomColors.grey,) - // ], - // ), - // SizedBox( - // height: 5, - // ), - // Divider( - // height: 5.0, - // color: CustomColors.grey2, - // ), - // ], - // ), - // ), - // ), - // ], - // ), - // ), - // ), - // ) - // .toList() - // ..add( - // InkWell( - // onTap: () async { - // GifLoaderDialogUtils.showMyDialog(context); - // currentIndex++; - // GetNotificationsRequestModel - // getNotificationsRequestModel = - // new GetNotificationsRequestModel( - // currentPage: currentIndex, - // pagingSize: 14, - // notificationStatusID: 2); - // - // await model.getNotifications( - // getNotificationsRequestModel, context); - // GifLoaderDialogUtils.hideDialog(context); - // }, - // child: Center( - // child: Image.asset('assets/images/notf.png'), - // ), - // ), - // )), ); } } diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 08a7971e..21a82f6a 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -53,14 +53,14 @@ class _HomePageFragment2State extends State { initialiseHmgServices(bool isLogin) { hmgServices.clear(); - hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCareTitle, TranslationBase.of(context).liveCareSubtitle, "assets/images/new/Live_Care.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); - hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).findUs, TranslationBase.of(context).reachUs, "assets/images/new/reach_us.svg", isLogin)); } @@ -496,7 +496,7 @@ class _HomePageFragment2State extends State { Container( width: double.infinity, height: double.infinity, - padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4), + padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.3), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, @@ -515,7 +515,7 @@ class _HomePageFragment2State extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - TranslationBase.of(context).onlinePharmacy, + TranslationBase.of(context).pharmacyTitle, style: TextStyle( color: Colors.black, fontSize: 14, @@ -526,7 +526,7 @@ class _HomePageFragment2State extends State { ), projectViewModel.isArabic ? mHeight(5) : Container(), Text( - TranslationBase.of(context).ecommerceSolution, + TranslationBase.of(context).pharmacySubtitle, style: TextStyle( color: Colors.black, fontSize: 9, diff --git a/lib/pages/landing/home_page_2.dart b/lib/pages/landing/home_page_2.dart index 2245872b..9f395cad 100644 --- a/lib/pages/landing/home_page_2.dart +++ b/lib/pages/landing/home_page_2.dart @@ -66,7 +66,7 @@ class _HomePageState2 extends State { } else { GifLoaderDialogUtils.showMyDialog(context); await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if (pharmacyModuleViewModel.error.isNotEmpty) { + if (!pharmacyModuleViewModel.error.isNotEmpty) { await pharmacyModuleViewModel.createUser().then((value) { GifLoaderDialogUtils.hideDialog(context); Navigator.push(context, FadePage(page: LandingPagePharmacy())); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 2bb0e1d0..628886db 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -279,7 +279,7 @@ class _Login extends State { ConfirmDialog.closeAlertDialog(context), Navigator.of(context).push(FadePage(page: Register())), }, - cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); + cancelFunction: () => {}); dialog.showAlertDialog(context); }); // SMSOTP.showLoadingDialog(context, false), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 76c09e00..d8201c65 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1761,7 +1761,9 @@ class TranslationBase { String get referralNumber => localizedValues['referralNumber'][locale.languageCode]; String get needPrescription => localizedValues['needPrescription'][locale.languageCode]; + String get outOfStockMsg => localizedValues['outOfStockMsg'][locale.languageCode]; + String get requestID => localizedValues['requestID'][locale.languageCode]; String get OrderStatus => localizedValues['OrderStatus'][locale.languageCode]; @@ -1799,10 +1801,11 @@ class TranslationBase { String get quantitySize => localizedValues['quantitySize'][locale.languageCode]; String get addToCart => localizedValues['addToCart'][locale.languageCode]; - String get addToWishlist => - localizedValues['addToWishlist'][locale.languageCode]; - String get removeFromWishlist => - localizedValues['removeFromWishlist'][locale.languageCode]; + + String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode]; + + String get removeFromWishlist => localizedValues['removeFromWishlist'][locale.languageCode]; + String get buyNow => localizedValues['buyNow'][locale.languageCode]; String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; @@ -2475,11 +2478,46 @@ class TranslationBase { String get Latest => localizedValues["Latest"][locale.languageCode]; String get Tour => localizedValues["Tour"][locale.languageCode]; + String get mostViewed => localizedValues["mostViewed"][locale.languageCode]; + String get newProducts => localizedValues["newProducts"][locale.languageCode]; String get paymentSelected => localizedValues["paymentSelected"][locale.languageCode]; + String get moreNotifications => localizedValues["moreNotifications"][locale.languageCode]; + + String get familyTitle => localizedValues["familyTitle"][locale.languageCode]; + + String get familySubtitle => localizedValues["familySubtitle"][locale.languageCode]; + + String get liveCareTitle => localizedValues["liveCareTitle"][locale.languageCode]; + + String get liveCareSubtitle => localizedValues["liveCareSubtitle"][locale.languageCode]; + + String get pharmacyTitle => localizedValues["pharmacyTitle"][locale.languageCode]; + + String get pharmacySubtitle => localizedValues["pharmacySubtitle"][locale.languageCode]; + + String get parkingTitle2 => localizedValues["parkingTitle2"][locale.languageCode]; + + String get parkingSubtitle => localizedValues["ParkingSubtitle"][locale.languageCode]; + + String get healthCalculatorTitle => localizedValues["healthCalculatorTitle"][locale.languageCode]; + + String get healthCalculatorSubtitle => localizedValues["healthCalculatorSubtitle"][locale.languageCode]; + + String get waterTitle => localizedValues["waterTitle"][locale.languageCode]; + + String get waterSubtitle => localizedValues["waterSubtitle"][locale.languageCode]; + + String get medicalFileTitle2 => localizedValues["medicalFileTitle2"][locale.languageCode]; + + String get medicalFileSubtitle => localizedValues["medicalFileSubtitle"][locale.languageCode]; + + String get healthConvertersTitle => localizedValues["healthConvertersTitle"][locale.languageCode]; + + String get healthConvertersSubtitle => localizedValues["healthConvertersSubtitle"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/bottom_options/BottomSheet.dart b/lib/widgets/bottom_options/BottomSheet.dart index 7bbadd8c..f0016fc5 100644 --- a/lib/widgets/bottom_options/BottomSheet.dart +++ b/lib/widgets/bottom_options/BottomSheet.dart @@ -23,7 +23,7 @@ class ImageOptions { icon: FeatherIcons.image, onTap: () async { File _image = - await ImagePicker.pickImage(source: ImageSource.gallery); + await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 50); String fileName = _image.path; final bytes = File(fileName).readAsBytesSync(); String base64Encode = base64.encode(bytes); @@ -37,7 +37,7 @@ class ImageOptions { icon: FeatherIcons.camera, onTap: () async { File _image = - await ImagePicker.pickImage(source: ImageSource.camera); + await ImagePicker.pickImage(source: ImageSource.camera, imageQuality: 50); String fileName = _image.path; final bytes = File(fileName).readAsBytesSync(); String base64Encode = base64.encode(bytes);