translation changes

pull/159/head
haroon amjad 4 months ago
parent 8f428297cb
commit 169215fd7b

@ -694,11 +694,7 @@
"bikini": "بيكيني", "bikini": "بيكيني",
"totalMinutes": "إجمالي الدقائق", "totalMinutes": "إجمالي الدقائق",
"feedback": "ملاحظات", "feedback": "ملاحظات",
"send": "أرسل",
"status": "الحالة",
"likeToHear": "نود سماع ملاحظاتك، ومخاوفك بشأن خدمات الرعاية الصحية وتجربة الخدمات الإلكترونية. يرجى استخدام النموذج أدناه", "likeToHear": "نود سماع ملاحظاتك، ومخاوفك بشأن خدمات الرعاية الصحية وتجربة الخدمات الإلكترونية. يرجى استخدام النموذج أدناه",
"subject": "الموضوع",
"message": "رسالة",
"emptySubject": "يرجى إدخال الموضوع", "emptySubject": "يرجى إدخال الموضوع",
"emptyMessage": "يرجى إدخال الرسالة", "emptyMessage": "يرجى إدخال الرسالة",
"selectAttachment": "اختر المرفق", "selectAttachment": "اختر المرفق",
@ -1009,5 +1005,95 @@
"orderCancelledSuccessfully": "تم إلغاء الطلب بنجاح", "orderCancelledSuccessfully": "تم إلغاء الطلب بنجاح",
"requestID": "معرف الطلب:", "requestID": "معرف الطلب:",
"noCMCOrdersYet": "ليس لديك أي طلبات فحص شامل بعد.", "noCMCOrdersYet": "ليس لديك أي طلبات فحص شامل بعد.",
"cmcOrders": "طلبات الفحص الشامل" "cmcOrders": "طلبات الفحص الشامل",
"summary": "الملخص",
"selectedService": "الخدمة المحددة",
"requestSubmittedSuccessfully": "تم إرسال طلبك بنجاح.",
"hereIsYourRequestNumber": "هذا هو رقم طلبك #: ",
"pleaseSelectHospitalToContinue": "يرجى اختيار مستشفى للمتابعة",
"confirmSubmitRequest": "هل أنت متأكد أنك تريد إرسال هذا الطلب؟",
"pendingOrderWait": "لديك طلب معلق. يرجى الانتظار حتى تتم معالجته.",
"noServicesAvailable": "لا توجد خدمات متاحة",
"selectAService": "اختر خدمة",
"comprehensiveCheckup": "الفحص الشامل",
"viewNearestHMGLocations": "عرض أقرب مواقع مجموعة الحبيب الطبية",
"provideFeedbackOnServices": "قدم ملاحظاتك على خدماتنا",
"liveChatWithHMG": "خيار الدردشة المباشرة مع مجموعة الحبيب الطبية",
"send": "إرسال",
"status": "الحالة",
"sendingFeedback": "جاري إرسال الملاحظات...",
"selectFeedbackType": "اختر نوع الملاحظات",
"loadingAppointmentsList": "جاري تحميل قائمة المواعيد...",
"noAppointmentsForFeedback": "ليس لديك أي مواعيد لتقديم ملاحظات عنها.",
"selectedAppointment": "الموعد المحدد:",
"subject": "الموضوع",
"enterSubjectHere": "أدخل الموضوع هنا",
"message": "الرسالة",
"enterMessageHere": "أدخل الرسالة هنا",
"filesSelected": "تم تحديد {count} ملف(ات)",
"otherDetails": "تفاصيل أخرى",
"medicalReport": "التقرير الطبي",
"medicalReportNumber": "التقرير الطبي {number}",
"patientIsInsured": "المريض مؤمن عليه",
"insuranceDocument": "وثيقة التأمين",
"selectBranch": "اختر الفرع",
"patientInformation": "معلومات المريض",
"patientLocation": "أين يتواجد المريض",
"identificationNumber": "رقم الهوية",
"enterIdentificationNumber": "أدخل رقم الهوية*",
"patientName": "اسم المريض*",
"referralRequesterInformation": "معلومات مقدم طلب الإحالة",
"enterReferralRequesterName": "أدخل اسم مقدم طلب الإحالة*",
"requesterName": "اسم مقدم الطلب",
"relationship": "العلاقة",
"selectRelation": "اختر العلاقة",
"otherName": "اسم آخر",
"otherNameHint": "اسم آخر*",
"requesterNameRequired": "اسم مقدم طلب الإحالة مطلوب",
"selectRelationshipRequired": "يرجى اختيار العلاقة",
"otherRelationshipNameRequired": "اسم العلاقة الأخرى مطلوب",
"identificationNumberRequired": "رقم الهوية مطلوب",
"patientNameRequired": "اسم المريض مطلوب",
"enterPatientPhoneRequired": "يرجى إدخال رقم هاتف المريض",
"selectPatientCityRequired": "يرجى اختيار مدينة المريض",
"medicalReportRequired": "مطلوب تقرير طبي واحد على الأقل",
"selectBranchRequired": "يرجى اختيار الفرع",
"insuranceDocumentRequired": "وثيقة التأمين مطلوبة للمرضى المؤمن عليهم",
"searchResult": "نتيجة البحث",
"referralNo": "رقم الإحالة {number}",
"eReferral": "الإحالة الإلكترونية",
"referralCreatedSuccessfully": "تم إنشاء إحالتك بنجاح.",
"hereIsYourReferralNumber": "هذا هو رقم الإحالة الخاص بك #: ",
"searchEReferral": "البحث عن إحالة إلكترونية",
"enterRequiredInfoToSearch": "يرجى إدخال المعلومات المطلوبة للبحث عن إحالة إلكترونية",
"selectPickupDirection": "اختر اتجاه الاستلام",
"selectDirection": "اختر الاتجاه",
"toHospital": "إلى المستشفى",
"fromHospital": "من المستشفى",
"selectWay": "اختر الطريقة",
"oneWay": "اتجاه واحد",
"twoWay": "اتجاهين",
"selectPickupDetails": "اختر تفاصيل الاستلام",
"pleaseSelectDetailsOfPickup": " يرجى تحديد تفاصيل الاستلام",
"selectDetails": "اختر التفاصيل",
"work": "العمل",
"pick": "استلام",
"insideTheHome": "داخل المنزل",
"haveAnyAppointment": "هل لديك أي موعد",
"amountPaidAtHospital": "سيتم دفع المبلغ في المستشفى",
"submitRequest": "إرسال الطلب",
"enterPickupLocationManually": "أدخل موقع الاستلام يدوياً",
"enterPickupLocation": "أدخل موقع الاستلام",
"trackingDetails": "تفاصيل التتبع",
"cancelRequest": "إلغاء الطلب",
"shareLocationWhatsapp": "مشاركة موقعك المباشر على واتساب",
"pleaseWaitForCall": "يرجى انتظار المكالمة",
"toHospitalLower": "إلى المستشفى",
"contact": "اتصال",
"failed": "فشل",
"confirmationCall": "مكالمة التأكيد",
"pickupFromHome": "الاستلام من المنزل",
"onTheWayToHospital": " في الطريق إلى المستشفى",
"arrivedAtHospital": "وصل إلى المستشفى",
"orderCancel": "إلغاء الطلب"
} }

@ -689,11 +689,7 @@
"bikini": "Bikini", "bikini": "Bikini",
"totalMinutes": "Total Minutes", "totalMinutes": "Total Minutes",
"feedback": "Feedback", "feedback": "Feedback",
"send": "أرسل",
"status": "الحالة",
"likeToHear": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", "likeToHear": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"subject": "الموضوع",
"message": "رسالة",
"emptySubject": "Please enter the subject", "emptySubject": "Please enter the subject",
"emptyMessage": "Please enter message", "emptyMessage": "Please enter message",
"selectAttachment": "Select Attachment", "selectAttachment": "Select Attachment",
@ -1005,5 +1001,95 @@
"orderCancelledSuccessfully": "Order has been cancelled successfully", "orderCancelledSuccessfully": "Order has been cancelled successfully",
"requestID": "Request ID:", "requestID": "Request ID:",
"noCMCOrdersYet": "You don't have any CMC orders yet.", "noCMCOrdersYet": "You don't have any CMC orders yet.",
"cmcOrders": "CMC Orders" "cmcOrders": "CMC Orders",
"summary": "Summary",
"selectedService": "Selected Service",
"requestSubmittedSuccessfully": "Your request has been successfully submitted.",
"hereIsYourRequestNumber": "Here is your request #: ",
"pleaseSelectHospitalToContinue": "Please select a hospital to continue",
"confirmSubmitRequest": "Are you sure you want to submit this request?",
"pendingOrderWait": "You have a pending order. Please wait for it to be processed.",
"noServicesAvailable": "No services available",
"selectAService": "Select a Service",
"comprehensiveCheckup": "Comprehensive Checkup",
"viewNearestHMGLocations": "View your nearest HMG locations",
"provideFeedbackOnServices": "Provide your feedback on our services",
"liveChatWithHMG": "Live chat option with HMG",
"send": "Send",
"status": "Status",
"sendingFeedback": "Sending Feedback...",
"selectFeedbackType": "Select Feedback Type",
"loadingAppointmentsList": "Loading appointments list...",
"noAppointmentsForFeedback": "You do not have any appointments to submit a feedback.",
"selectedAppointment": "Selected Appointment:",
"subject": "Subject",
"enterSubjectHere": "Enter subject here",
"message": "Message",
"enterMessageHere": "Enter message here",
"filesSelected": "{count} file(s) selected",
"otherDetails": "Other Details",
"medicalReport": "Medical Report",
"medicalReportNumber": "Medical Report {number}",
"patientIsInsured": "Patient is Insured",
"insuranceDocument": "Insurance Document",
"selectBranch": "Select Branch",
"patientInformation": "Patient information",
"patientLocation": "Where the patient located",
"identificationNumber": "Identification Number",
"enterIdentificationNumber": "Enter Identification Number*",
"patientName": "Patient Name*",
"referralRequesterInformation": "Referral requester information",
"enterReferralRequesterName": "Enter Referral Requester Name*",
"requesterName": "Requester Name",
"relationship": "Relationship",
"selectRelation": "Select Relation",
"otherName": "Other Name",
"otherNameHint": "Other Name*",
"requesterNameRequired": "Referral requester name is required",
"selectRelationshipRequired": "Please select a relationship",
"otherRelationshipNameRequired": "Other relationship name is required",
"identificationNumberRequired": "Identification number is required",
"patientNameRequired": "Patient name is required",
"enterPatientPhoneRequired": "Please Enter patient phone number",
"selectPatientCityRequired": "Please select patient city",
"medicalReportRequired": "At least one medical report is required",
"selectBranchRequired": "Please select a branch",
"insuranceDocumentRequired": "Insurance document is required for insured patients",
"searchResult": "Search Result",
"referralNo": "Referral No {number}",
"eReferral": "E Referral",
"referralCreatedSuccessfully": "Your Referral has been created Successfully.",
"hereIsYourReferralNumber": "Here is your Referral #: ",
"searchEReferral": "Search E-Referral",
"enterRequiredInfoToSearch": "Please enter the required information to search for an e-referral",
"selectPickupDirection": "Select Pickup Direction",
"selectDirection": "Select Direction",
"toHospital": "To Hospital",
"fromHospital": "From Hospital",
"selectWay": "Select Way",
"oneWay": "One Way",
"twoWay": "Two Way",
"selectPickupDetails": "Select Pickup Details",
"pleaseSelectDetailsOfPickup": " Please select the details of pickup",
"selectDetails": "Select Details",
"work": "Work",
"pick": "Pick",
"insideTheHome": "Inside the home",
"haveAnyAppointment": "Have any appointment",
"amountPaidAtHospital": "Amount will be paid at the hospital",
"submitRequest": "Submit Request",
"enterPickupLocationManually": "Enter Pickup Location Manually",
"enterPickupLocation": "Enter Pickup Location",
"trackingDetails": "Tracking Details",
"cancelRequest": "Cancel Request",
"shareLocationWhatsapp": "Share Your Live Location on Whatsapp",
"pleaseWaitForCall": "Please wait for the call",
"toHospitalLower": "to hospital",
"contact": "Contact",
"failed": "Failed",
"confirmationCall": "Confirmation Call",
"pickupFromHome": "Pickup Up from Home",
"onTheWayToHospital": " On The Way To Hospital",
"arrivedAtHospital": "Arrived at Hospital",
"orderCancel": "Order Cancel"
} }

@ -15,7 +15,7 @@ extension CapExtension on String {
String get allInCaps => toUpperCase(); String get allInCaps => toUpperCase();
String get needTranslation => this; // String get needTranslation => this;
String get capitalizeFirstofEach => trim().isNotEmpty ? trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : ""; String get capitalizeFirstofEach => trim().isNotEmpty ? trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : "";
} }

@ -693,11 +693,7 @@ abstract class LocaleKeys {
static const bikini = 'bikini'; static const bikini = 'bikini';
static const totalMinutes = 'totalMinutes'; static const totalMinutes = 'totalMinutes';
static const feedback = 'feedback'; static const feedback = 'feedback';
static const send = 'send';
static const status = 'status';
static const likeToHear = 'likeToHear'; static const likeToHear = 'likeToHear';
static const subject = 'subject';
static const message = 'message';
static const emptySubject = 'emptySubject'; static const emptySubject = 'emptySubject';
static const emptyMessage = 'emptyMessage'; static const emptyMessage = 'emptyMessage';
static const selectAttachment = 'selectAttachment'; static const selectAttachment = 'selectAttachment';
@ -1006,5 +1002,95 @@ abstract class LocaleKeys {
static const requestID = 'requestID'; static const requestID = 'requestID';
static const noCMCOrdersYet = 'noCMCOrdersYet'; static const noCMCOrdersYet = 'noCMCOrdersYet';
static const cmcOrders = 'cmcOrders'; static const cmcOrders = 'cmcOrders';
static const summary = 'summary';
static const selectedService = 'selectedService';
static const requestSubmittedSuccessfully = 'requestSubmittedSuccessfully';
static const hereIsYourRequestNumber = 'hereIsYourRequestNumber';
static const pleaseSelectHospitalToContinue = 'pleaseSelectHospitalToContinue';
static const confirmSubmitRequest = 'confirmSubmitRequest';
static const pendingOrderWait = 'pendingOrderWait';
static const noServicesAvailable = 'noServicesAvailable';
static const selectAService = 'selectAService';
static const comprehensiveCheckup = 'comprehensiveCheckup';
static const viewNearestHMGLocations = 'viewNearestHMGLocations';
static const provideFeedbackOnServices = 'provideFeedbackOnServices';
static const liveChatWithHMG = 'liveChatWithHMG';
static const send = 'send';
static const status = 'status';
static const sendingFeedback = 'sendingFeedback';
static const selectFeedbackType = 'selectFeedbackType';
static const loadingAppointmentsList = 'loadingAppointmentsList';
static const noAppointmentsForFeedback = 'noAppointmentsForFeedback';
static const selectedAppointment = 'selectedAppointment';
static const subject = 'subject';
static const enterSubjectHere = 'enterSubjectHere';
static const message = 'message';
static const enterMessageHere = 'enterMessageHere';
static const filesSelected = 'filesSelected';
static const otherDetails = 'otherDetails';
static const medicalReport = 'medicalReport';
static const medicalReportNumber = 'medicalReportNumber';
static const patientIsInsured = 'patientIsInsured';
static const insuranceDocument = 'insuranceDocument';
static const selectBranch = 'selectBranch';
static const patientInformation = 'patientInformation';
static const patientLocation = 'patientLocation';
static const identificationNumber = 'identificationNumber';
static const enterIdentificationNumber = 'enterIdentificationNumber';
static const patientName = 'patientName';
static const referralRequesterInformation = 'referralRequesterInformation';
static const enterReferralRequesterName = 'enterReferralRequesterName';
static const requesterName = 'requesterName';
static const relationship = 'relationship';
static const selectRelation = 'selectRelation';
static const otherName = 'otherName';
static const otherNameHint = 'otherNameHint';
static const requesterNameRequired = 'requesterNameRequired';
static const selectRelationshipRequired = 'selectRelationshipRequired';
static const otherRelationshipNameRequired = 'otherRelationshipNameRequired';
static const identificationNumberRequired = 'identificationNumberRequired';
static const patientNameRequired = 'patientNameRequired';
static const enterPatientPhoneRequired = 'enterPatientPhoneRequired';
static const selectPatientCityRequired = 'selectPatientCityRequired';
static const medicalReportRequired = 'medicalReportRequired';
static const selectBranchRequired = 'selectBranchRequired';
static const insuranceDocumentRequired = 'insuranceDocumentRequired';
static const searchResult = 'searchResult';
static const referralNo = 'referralNo';
static const eReferral = 'eReferral';
static const referralCreatedSuccessfully = 'referralCreatedSuccessfully';
static const hereIsYourReferralNumber = 'hereIsYourReferralNumber';
static const searchEReferral = 'searchEReferral';
static const enterRequiredInfoToSearch = 'enterRequiredInfoToSearch';
static const selectPickupDirection = 'selectPickupDirection';
static const selectDirection = 'selectDirection';
static const toHospital = 'toHospital';
static const fromHospital = 'fromHospital';
static const selectWay = 'selectWay';
static const oneWay = 'oneWay';
static const twoWay = 'twoWay';
static const selectPickupDetails = 'selectPickupDetails';
static const pleaseSelectDetailsOfPickup = 'pleaseSelectDetailsOfPickup';
static const selectDetails = 'selectDetails';
static const work = 'work';
static const pick = 'pick';
static const insideTheHome = 'insideTheHome';
static const haveAnyAppointment = 'haveAnyAppointment';
static const amountPaidAtHospital = 'amountPaidAtHospital';
static const submitRequest = 'submitRequest';
static const enterPickupLocationManually = 'enterPickupLocationManually';
static const enterPickupLocation = 'enterPickupLocation';
static const trackingDetails = 'trackingDetails';
static const cancelRequest = 'cancelRequest';
static const shareLocationWhatsapp = 'shareLocationWhatsapp';
static const pleaseWaitForCall = 'pleaseWaitForCall';
static const toHospitalLower = 'toHospitalLower';
static const contact = 'contact';
static const failed = 'failed';
static const confirmationCall = 'confirmationCall';
static const pickupFromHome = 'pickupFromHome';
static const onTheWayToHospital = 'onTheWayToHospital';
static const arrivedAtHospital = 'arrivedAtHospital';
static const orderCancel = 'orderCancel';
} }

@ -55,7 +55,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
final isArabic = appState.isArabic(); final isArabic = appState.isArabic();
return CollapsingListView( return CollapsingListView(
title: "Summary".needTranslation, title: LocaleKeys.summary.tr(context: context),
bottomChild: _buildBottomButton(), bottomChild: _buildBottomButton(),
child: SingleChildScrollView( child: SingleChildScrollView(
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
@ -89,7 +89,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
"Select Hospital".needTranslation, LocaleKeys.selectHospital.tr(context: context),
style: TextStyle( style: TextStyle(
fontSize: 16.f, fontSize: 16.f,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -132,7 +132,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
Text( Text(
isLocationSelected && selectedHospital != null isLocationSelected && selectedHospital != null
? (isArabic ? (selectedHospital.nameN ?? selectedHospital.name ?? '') : (selectedHospital.name ?? '')) ? (isArabic ? (selectedHospital.nameN ?? selectedHospital.name ?? '') : (selectedHospital.name ?? ''))
: "Select Hospital".needTranslation, : LocaleKeys.selectHospital.tr(context: context),
style: TextStyle( style: TextStyle(
fontSize: 14.f, fontSize: 14.f,
fontWeight: isLocationSelected ? FontWeight.w600 : FontWeight.w400, fontWeight: isLocationSelected ? FontWeight.w600 : FontWeight.w400,
@ -189,7 +189,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Selected Service".needTranslation.toText14( LocaleKeys.selectedService.tr(context: context).toText14(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
letterSpacing: -0.4, letterSpacing: -0.4,
@ -226,14 +226,14 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 24.h), SizedBox(height: 24.h),
"Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h), SizedBox(height: 17.h),
// Amount before tax // Amount before tax
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"Amount before tax".needTranslation.toText14(isBold: true), LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
amountBeforeTax.toString().toText16(isBold: true), amountBeforeTax.toString().toText16(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -247,7 +247,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor), LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
taxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor), taxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor, AppColors.greyTextColor,
@ -261,7 +261,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"".needTranslation.toText14(isBold: true), "".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
totalAmount.toString().toText24(isBold: true), totalAmount.toString().toText24(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -298,7 +298,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
], ],
), ),
child: CustomButton( child: CustomButton(
text: "Confirm".needTranslation, text: LocaleKeys.confirm.tr(context: context),
onPressed: () { onPressed: () {
isLocationSelected ? _handleConfirm() : null; isLocationSelected ? _handleConfirm() : null;
}, },
@ -339,10 +339,10 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: Column( child: Column(
children: [ children: [
Utils.getSuccessWidget(loadingText: "Your request has been successfully submitted.".needTranslation), Utils.getSuccessWidget(loadingText: LocaleKeys.requestSubmittedSuccessfully.tr(context: context)),
Row( Row(
children: [ children: [
"Here is your request #: ".needTranslation.toText14( LocaleKeys.hereIsYourRequestNumber.tr(context: context).toText14(
color: AppColors.textColorLight, color: AppColors.textColorLight,
weight: FontWeight.w500, weight: FontWeight.w500,
), ),
@ -383,7 +383,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
if (selectedHospital == null) { if (selectedHospital == null) {
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text("Please select a hospital to continue".needTranslation), content: Text(LocaleKeys.pleaseSelectHospitalToContinue.tr(context: context)),
backgroundColor: AppColors.errorColor, backgroundColor: AppColors.errorColor,
), ),
); );
@ -395,7 +395,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
title: LocaleKeys.notice.tr(context: context), title: LocaleKeys.notice.tr(context: context),
context, context,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: "Are you sure you want to submit this request?".needTranslation, loadingText: LocaleKeys.confirmSubmitRequest.tr(context: context),
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () { onCancelTap: () {
Navigator.pop(context); Navigator.pop(context);

@ -12,6 +12,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_all_orders_resp_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_all_orders_resp_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_services_resp_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_services_resp_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/cmc_order_detail_page.dart'; import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/cmc_order_detail_page.dart';
import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/cmc_selection_review_page.dart'; import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/cmc_selection_review_page.dart';
import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/widgets/cmc_ui_selection_helper.dart'; import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/widgets/cmc_ui_selection_helper.dart';
@ -128,7 +129,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
// Request ID // Request ID
Row( Row(
children: [ children: [
"Request ID:".needTranslation.toText14(color: AppColors.textColorLight, weight: FontWeight.w500), LocaleKeys.requestID.tr(context: context).toText14(color: AppColors.textColorLight, weight: FontWeight.w500),
SizedBox(width: 4.w), SizedBox(width: 4.w),
"${order.iD ?? '-'}".toText16(isBold: true), "${order.iD ?? '-'}".toText16(isBold: true),
], ],
@ -179,7 +180,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
), ),
SizedBox(width: 8.w), SizedBox(width: 8.w),
Expanded( Expanded(
child: "You have a pending order. Please wait for it to be processed.".needTranslation.toText12( child: LocaleKeys.pendingOrderWait.tr(context: context).toText12(
color: AppColors.infoBannerTextColor, color: AppColors.infoBannerTextColor,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
@ -193,7 +194,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Cancel Order".needTranslation, text: LocaleKeys.cancelOrder.tr(context: context),
onPressed: () => CmcUiSelectionHelper.showCancelConfirmationDialog(context: context, order: order), onPressed: () => CmcUiSelectionHelper.showCancelConfirmationDialog(context: context, order: order),
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
@ -219,7 +220,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
child: Padding( child: Padding(
padding: EdgeInsets.all(24.h), padding: EdgeInsets.all(24.h),
child: Text( child: Text(
'No services available'.needTranslation, LocaleKeys.noServicesAvailable.tr(context: context),
style: TextStyle( style: TextStyle(
fontSize: 16.h, fontSize: 16.h,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
@ -234,7 +235,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
children: [ children: [
SizedBox(height: 16.h), SizedBox(height: 16.h),
Text( Text(
'Select a Service'.needTranslation, LocaleKeys.selectAService.tr(context: context),
style: TextStyle( style: TextStyle(
fontSize: 20.h, fontSize: 20.h,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -357,7 +358,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return CollapsingListView( return CollapsingListView(
title: "Comprehensive Checkup".needTranslation, title: LocaleKeys.comprehensiveCheckup.tr(context: context),
history: () => Navigator.of(context).push(CustomPageRoute(page: CmcOrderDetailPage(), direction: AxisDirection.up)), history: () => Navigator.of(context).push(CustomPageRoute(page: CmcOrderDetailPage(), direction: AxisDirection.up)),
bottomChild: Consumer<HmgServicesViewModel>( bottomChild: Consumer<HmgServicesViewModel>(
builder: (context, hmgServicesViewModel, child) { builder: (context, hmgServicesViewModel, child) {
@ -375,7 +376,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 12.h), padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 12.h),
child: CustomButton( child: CustomButton(
borderWidth: 0, borderWidth: 0,
text: "Next".needTranslation, text: LocaleKeys.next.tr(context: context),
onPressed: _proceedWithSelectedService, onPressed: _proceedWithSelectedService,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
borderRadius: 12.r, borderRadius: 12.r,

@ -36,7 +36,7 @@ class ContactUs extends StatelessWidget {
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.findUs.tr(), LocaleKeys.findUs.tr(),
"View your nearest HMG locations".needTranslation, LocaleKeys.viewNearestHMGLocations.tr(),
).onPress(() { ).onPress(() {
locationUtils.getCurrentLocation(onSuccess: (value) { locationUtils.getCurrentLocation(onSuccess: (value) {
contactUsViewModel.initContactUsViewModel(); contactUsViewModel.initContactUsViewModel();
@ -52,7 +52,7 @@ class ContactUs extends StatelessWidget {
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.feedback.tr(), LocaleKeys.feedback.tr(),
"Provide your feedback on our services".needTranslation, LocaleKeys.provideFeedbackOnServices.tr(),
).onPress(() { ).onPress(() {
contactUsViewModel.setSelectedFeedbackType( contactUsViewModel.setSelectedFeedbackType(
FeedbackType(id: 5, nameEN: "Not classified", nameAR: 'غير محدد'), FeedbackType(id: 5, nameEN: "Not classified", nameAR: 'غير محدد'),
@ -68,7 +68,7 @@ class ContactUs extends StatelessWidget {
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.liveChat.tr(), LocaleKeys.liveChat.tr(),
"Live chat option with HMG".needTranslation, LocaleKeys.liveChatWithHMG.tr(),
).onPress(() { ).onPress(() {
locationUtils.getCurrentLocation(onSuccess: (value) { locationUtils.getCurrentLocation(onSuccess: (value) {
contactUsViewModel.getLiveChatProjectsList(); contactUsViewModel.getLiveChatProjectsList();

@ -55,8 +55,8 @@ class FeedbackPage extends StatelessWidget {
activeTextColor: AppColors.primaryRedColor, activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1), activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [ tabs: [
CustomTabBarModel(null, "Send".needTranslation), CustomTabBarModel(null, LocaleKeys.send.tr(context: context)),
CustomTabBarModel(null, "Status".needTranslation), CustomTabBarModel(null, LocaleKeys.status.tr(context: context)),
], ],
onTabChange: (index) { onTabChange: (index) {
contactUsViewModel.setIsSendFeedbackTabSelected(index == 0); contactUsViewModel.setIsSendFeedbackTabSelected(index == 0);
@ -93,7 +93,7 @@ class FeedbackPage extends StatelessWidget {
); );
return; return;
} }
LoaderBottomSheet.showLoader(loadingText: "Sending Feedback...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingFeedback.tr(context: context));
contactUsViewModel.insertCOCItem( contactUsViewModel.insertCOCItem(
subject: subjectTextController.text, subject: subjectTextController.text,
message: messageTextController.text, message: messageTextController.text,
@ -172,7 +172,7 @@ class FeedbackPage extends StatelessWidget {
], ],
).onPress(() { ).onPress(() {
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context,
title: "Select Feedback Type".needTranslation, title: LocaleKeys.selectFeedbackType.tr(context: context),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24),
@ -207,7 +207,7 @@ class FeedbackPage extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
contactUsViewModel.setSelectedFeedbackType(newValue!); contactUsViewModel.setSelectedFeedbackType(newValue!);
if (contactUsViewModel.selectedFeedbackType.id == 1) { if (contactUsViewModel.selectedFeedbackType.id == 1) {
LoaderBottomSheet.showLoader(loadingText: "Loading appointments list...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingAppointmentsList.tr(context: context));
await medicalFileViewModel.getPatientMedicalReportAppointmentsList(onSuccess: (val) async { await medicalFileViewModel.getPatientMedicalReportAppointmentsList(onSuccess: (val) async {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
bool? value = await Navigator.of(context).push( bool? value = await Navigator.of(context).push(
@ -224,7 +224,7 @@ class FeedbackPage extends StatelessWidget {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "You do not have any appointments to submit a feedback.".needTranslation), child: Utils.getErrorWidget(loadingText: LocaleKeys.noAppointmentsForFeedback.tr(context: context)),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -248,7 +248,7 @@ class FeedbackPage extends StatelessWidget {
), ),
if (contactUsViewModel.patientFeedbackSelectedAppointment != null) ...[ if (contactUsViewModel.patientFeedbackSelectedAppointment != null) ...[
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Selected Appointment:".needTranslation.toText16(isBold: true), LocaleKeys.selectedAppointment.tr(context: context).toText16(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Container( Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@ -295,8 +295,8 @@ class FeedbackPage extends StatelessWidget {
], ],
SizedBox(height: 16.h), SizedBox(height: 16.h),
TextInputWidget( TextInputWidget(
labelText: "Subject".needTranslation, labelText: LocaleKeys.subject.tr(context: context),
hintText: "Enter subject here".needTranslation, hintText: LocaleKeys.enterSubjectHere.tr(context: context),
controller: subjectTextController, controller: subjectTextController,
isEnable: true, isEnable: true,
prefix: null, prefix: null,
@ -310,8 +310,8 @@ class FeedbackPage extends StatelessWidget {
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
TextInputWidget( TextInputWidget(
labelText: "Message".needTranslation, labelText: LocaleKeys.message.tr(context: context),
hintText: "Enter message here".needTranslation, hintText: LocaleKeys.enterMessageHere.tr(context: context),
controller: messageTextController, controller: messageTextController,
isEnable: true, isEnable: true,
prefix: null, prefix: null,

@ -114,7 +114,6 @@ class LiveChatPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM") ("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM")
.needTranslation
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor), .toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor),
Transform.flip( Transform.flip(
flipX: getIt.get<AppState>().isArabic(), flipX: getIt.get<AppState>().isArabic(),

@ -68,7 +68,7 @@ class FindUsItemCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${getHMGLocationsModel.distanceInKilometers ?? ""} km".needTranslation, labelText: "${getHMGLocationsModel.distanceInKilometers ?? ""} km",
icon: AppAssets.location_red, icon: AppAssets.location_red,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
@ -77,7 +77,7 @@ class FindUsItemCard extends StatelessWidget {
Row( Row(
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Get Directions".needTranslation, labelText: LocaleKeys.getDirections.tr(),
icon: AppAssets.directions_icon, icon: AppAssets.directions_icon,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
backgroundColor: AppColors.textColor.withValues(alpha: 0.8), backgroundColor: AppColors.textColor.withValues(alpha: 0.8),

@ -94,7 +94,7 @@ class _Covid19LandingPageState extends State<Covid19LandingPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomButton( CustomButton(
text: "SelectLocation".needTranslation, text: "Select Location",
onPressed: () { onPressed: () {
_showBranchBottomSheet(context); _showBranchBottomSheet(context);
}, },
@ -124,7 +124,7 @@ class _Covid19LandingPageState extends State<Covid19LandingPage> {
showCommonBottomSheet( showCommonBottomSheet(
context, context,
title: "Select Branch".needTranslation, title: "Select Branch",
height: ResponsiveExtension.screenHeight * 0.651, height: ResponsiveExtension.screenHeight * 0.651,
child: StatefulBuilder( child: StatefulBuilder(
builder: (context, setBottomSheetState) { builder: (context, setBottomSheetState) {
@ -240,7 +240,7 @@ class _Covid19LandingPageState extends State<Covid19LandingPage> {
child: SafeArea( child: SafeArea(
top: false, top: false,
child: CustomButton( child: CustomButton(
text: "Next".needTranslation, text: LocaleKeys.next.tr(context: context),
onPressed: (){ onPressed: (){
Navigator.of(context) Navigator.of(context)

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/covid_questionnare_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/covid_questionnare_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/covid19test/covid_review_screen.dart'; import 'package:hmg_patient_app_new/presentation/covid19test/covid_review_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -61,7 +63,7 @@ class _Covid19QuestionnaireState extends State<Covid19Questionnaire> {
topRight: Radius.circular(24.r), topRight: Radius.circular(24.r),
), ),
),child: CustomButton( ),child: CustomButton(
text: "Next".needTranslation, text: LocaleKeys.next.tr(context: context),
onPressed: () { onPressed: () {
moveToNextPage(context); moveToNextPage(context);
}, },

@ -89,7 +89,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: widget.title.needTranslation, title: widget.title,
bottomChild: Container( bottomChild: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
@ -100,19 +100,19 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 24.h), SizedBox(height: 24.h),
"Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h), SizedBox(height: 17.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"Amount before tax".needTranslation.toText14(isBold: true), LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true), Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor), LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
// Show VAT amount passed from review screen // Show VAT amount passed from review screen
Utils.getPaymentAmountWithSymbol((widget.taxAmount.toString()).toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, isSaudiCurrency: true), Utils.getPaymentAmountWithSymbol((widget.taxAmount.toString()).toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, isSaudiCurrency: true),
], ],
@ -121,7 +121,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"".needTranslation.toText14(isBold: true), "".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true), Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
@ -212,7 +212,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
children: [ children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h), Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true), LocaleKeys.mada.tr(context: context).toText16(isBold: true),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -257,7 +257,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true), LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -312,7 +312,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
}, },
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Tamara".needTranslation.toText16(isBold: true), LocaleKeys.tamara.tr(context: context).toText16(isBold: true),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -387,7 +387,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
} }
Future<void> checkPaymentStatus() async { Future<void> checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
try { try {
await payfortViewModel.checkPaymentStatus(transactionID: transID, onSuccess: (apiResponse) async { await payfortViewModel.checkPaymentStatus(transactionID: transID, onSuccess: (apiResponse) async {
// treat any successful responseMessage as success; otherwise show generic error // treat any successful responseMessage as success; otherwise show generic error
@ -396,7 +396,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
if (success) { if (success) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: "Payment successful".needTranslation), child: Utils.getSuccessWidget(loadingText: "Payment successful"),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -404,7 +404,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation), child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,

@ -75,7 +75,7 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"Amount before tax".needTranslation.toText18(isBold: true), LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
(info.patientShareField ?? 0).toString().toText16(isBold: true), (info.patientShareField ?? 0).toString().toText16(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -87,7 +87,7 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"Tax Amount".needTranslation.toText14(isBold: true), LocaleKeys.vat15.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
(info.patientTaxAmountField ?? 0).toString().toText16(isBold: true), (info.patientTaxAmountField ?? 0).toString().toText16(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -208,13 +208,13 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
Expanded( Expanded(
child: CustomButton( child: CustomButton(
height: 56.h, height: 56.h,
text: "Next".needTranslation, text: LocaleKeys.next.tr(context: context),
onPressed: () async { onPressed: () async {
// Validate selection and payment info // Validate selection and payment info
if (_selectedProcedure == null) { if (_selectedProcedure == null) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "Please select a procedure".needTranslation), child: Utils.getErrorWidget(loadingText: "Please select a procedure"),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -236,7 +236,7 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
if (hmgServicesViewModel.covidPaymentInfo == null) { if (hmgServicesViewModel.covidPaymentInfo == null) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "Payment information not available".needTranslation), child: Utils.getErrorWidget(loadingText: "Payment information not available"),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,

@ -1,64 +1,65 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/e_referral_form_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/e_referral_form_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
class ReferralValidator { class ReferralValidator {
static FormValidationErrors validateStep1(ReferralFormData formData) { static FormValidationErrors validateStep1(ReferralFormData formData, BuildContext context) {
final errors = FormValidationErrors(); final errors = FormValidationErrors();
if (formData.requesterName.trim().isEmpty) { if (formData.requesterName.trim().isEmpty) {
errors.requesterName = 'Referral requester name is required'.needTranslation; errors.requesterName = LocaleKeys.requesterNameRequired.tr(context: context);
} }
if (formData.relationship == null) { if (formData.relationship == null) {
errors.relationship = 'Please select a relationship'.needTranslation; errors.relationship = LocaleKeys.selectRelationshipRequired.tr(context: context);
} }
if (formData.relationship != null && if (formData.relationship != null &&
formData.relationship?.iD == 5 && formData.relationship?.iD == 5 &&
formData.otherRelationshipName.trim().isEmpty) { formData.otherRelationshipName.trim().isEmpty) {
errors.otherRelationshipName = 'Other relationship name is required'.needTranslation; errors.otherRelationshipName = LocaleKeys.otherRelationshipNameRequired.tr(context: context);
} }
return errors; return errors;
} }
static FormValidationErrors validateStep2(ReferralFormData formData) { static FormValidationErrors validateStep2(ReferralFormData formData, BuildContext context) {
final errors = FormValidationErrors(); final errors = FormValidationErrors();
if (formData.patientIdentification.trim().isEmpty) { if (formData.patientIdentification.trim().isEmpty) {
errors.patientIdentification = 'Identification number is required'.needTranslation; errors.patientIdentification = LocaleKeys.identificationNumberRequired.tr(context: context);
} }
if (formData.patientName.trim().isEmpty) { if (formData.patientName.trim().isEmpty) {
errors.patientName = 'Patient name is required'.needTranslation; errors.patientName = LocaleKeys.patientNameRequired.tr(context: context);
} }
if (formData.patientPhone == null) { if (formData.patientPhone == null) {
errors.patientPhone = 'Please Enter patient phone number'.needTranslation; errors.patientPhone = LocaleKeys.enterPatientPhoneRequired.tr(context: context);
} }
if (formData.patientCity == null) { if (formData.patientCity == null) {
errors.patientCity = 'Please select patient city'.needTranslation; errors.patientCity = LocaleKeys.selectPatientCityRequired.tr(context: context);
} }
return errors; return errors;
} }
static FormValidationErrors validateStep3(ReferralFormData formData) { static FormValidationErrors validateStep3(ReferralFormData formData, BuildContext context) {
final errors = FormValidationErrors(); final errors = FormValidationErrors();
if (formData.medicalReportImages.isEmpty) { if (formData.medicalReportImages.isEmpty) {
errors.medicalReport = 'At least one medical report is required'.needTranslation; errors.medicalReport = LocaleKeys.medicalReportRequired.tr(context: context);
} }
if (formData.branch == null) { if (formData.branch == null) {
errors.branch = 'Please select a branch'.needTranslation; errors.branch = LocaleKeys.selectBranchRequired.tr(context: context);
} }
if (formData.isPatientInsured && formData.insuredPatientImages.isEmpty) { if (formData.isPatientInsured && formData.insuredPatientImages.isEmpty) {
errors.insuredDocument = 'Insurance document is required for insured patients'.needTranslation; errors.insuredDocument = LocaleKeys.insuranceDocumentRequired.tr(context: context);
} }
return errors; return errors;

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart';
@ -5,6 +6,7 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/search_e_referral_resp_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/search_e_referral_resp_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -31,7 +33,7 @@ class _SearchResultPageState extends State<SearchResultPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return CollapsingListView( return CollapsingListView(
title: "Search Result".needTranslation, title: LocaleKeys.searchResult.tr(context: context),
child: Column( child: Column(
children: [ children: [
// List of referrals // List of referrals
@ -61,10 +63,7 @@ class _SearchResultPageState extends State<SearchResultPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.referralNo.tr(context: context, namedArgs: {'number': '${referral.referralNumber}'}).toText18(isBold: true, color: AppColors.textColor),
'Referral No ${referral.referralNumber}'.needTranslation.toText18(isBold: true, color: AppColors.textColor),
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 6), padding: EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration( decoration: BoxDecoration(

@ -81,13 +81,13 @@ class _NewReferralPageState extends State<NewReferralPage> {
switch (_currentStep) { switch (_currentStep) {
case 0: case 0:
stepErrors = ReferralValidator.validateStep1(_formManager.formData); stepErrors = ReferralValidator.validateStep1(_formManager.formData, context);
break; break;
case 1: case 1:
stepErrors = ReferralValidator.validateStep2(_formManager.formData); stepErrors = ReferralValidator.validateStep2(_formManager.formData, context);
break; break;
case 2: case 2:
stepErrors = ReferralValidator.validateStep3(_formManager.formData); stepErrors = ReferralValidator.validateStep3(_formManager.formData, context);
break; break;
default: default:
stepErrors = FormValidationErrors(); stepErrors = FormValidationErrors();
@ -159,7 +159,7 @@ class _NewReferralPageState extends State<NewReferralPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: "E Referral".needTranslation, title: LocaleKeys.eReferral.tr(context: context),
isClose: false, isClose: false,
search: () async { search: () async {
await Navigator.of(context).push( await Navigator.of(context).push(
@ -222,10 +222,10 @@ class _NewReferralPageState extends State<NewReferralPage> {
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: Column( child: Column(
children: [ children: [
Utils.getSuccessWidget(loadingText: "Your Referral has been created Successfully.".needTranslation), Utils.getSuccessWidget(loadingText: LocaleKeys.referralCreatedSuccessfully.tr(context: context)),
Row( Row(
children: [ children: [
"Here is your Referral #: ".needTranslation.toText14( LocaleKeys.hereIsYourReferralNumber.tr(context: context).toText14(
color: AppColors.textColorLight, color: AppColors.textColorLight,
weight: FontWeight.w500, weight: FontWeight.w500,
), ),

@ -80,7 +80,7 @@ class _SearchEReferralPageState extends State<SearchEReferralPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return CollapsingListView( return CollapsingListView(
title: "Search E-Referral".needTranslation, title: LocaleKeys.searchEReferral.tr(context: context),
isClose: true, isClose: true,
bottomChild: Container( bottomChild: Container(
color: Colors.white, color: Colors.white,
@ -111,7 +111,7 @@ class _SearchEReferralPageState extends State<SearchEReferralPage> {
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [SizedBox(height: 8), 'Please enter the required information to search for an e-referral'.needTranslation.toText12()], children: [SizedBox(height: 8), LocaleKeys.enterRequiredInfoToSearch.tr(context: context).toText12()],
), ),
); );
} }

@ -1,10 +1,12 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/validation_utils.dart'; import 'package:hmg_patient_app_new/core/utils/validation_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/req_models/create_e_referral_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/req_models/create_e_referral_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart'; import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -46,14 +48,14 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
void _updateMedicalReportText() { void _updateMedicalReportText() {
final hasMedicalReports = _formManager.formData.medicalReportImages.isNotEmpty; final hasMedicalReports = _formManager.formData.medicalReportImages.isNotEmpty;
_medicalReportController.text = hasMedicalReports _medicalReportController.text = hasMedicalReports
? '${_formManager.formData.medicalReportImages.length} file(s) selected'.needTranslation ? '${_formManager.formData.medicalReportImages.length} file(s) selected'
: ''; : '';
} }
void _updateInsuranceText() { void _updateInsuranceText() {
final hasInsuranceDocs = _formManager.formData.insuredPatientImages.isNotEmpty; final hasInsuranceDocs = _formManager.formData.insuredPatientImages.isNotEmpty;
_insuranceController.text = hasInsuranceDocs _insuranceController.text = hasInsuranceDocs
? '${_formManager.formData.insuredPatientImages.length} file(s) selected'.needTranslation ? '${_formManager.formData.insuredPatientImages.length} file(s) selected'
: ''; : '';
} }
@ -68,7 +70,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
children: [ children: [
const SizedBox(height: 12), const SizedBox(height: 12),
_buildSectionTitle('Other Details'.needTranslation), _buildSectionTitle(LocaleKeys.otherDetails.tr(context: context)),
const SizedBox(height: 12), const SizedBox(height: 12),
_buildMedicalReportField(formManager), _buildMedicalReportField(formManager),
_buildBranchField(context, formManager), _buildBranchField(context, formManager),
@ -96,8 +98,8 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
child: TextInputWidget( child: TextInputWidget(
controller: _medicalReportController, controller: _medicalReportController,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Medical Report'.needTranslation, hintText: LocaleKeys.medicalReport.tr(context: context),
labelText: 'Select Attachment'.needTranslation, labelText: LocaleKeys.selectAttachment.tr(context: context),
suffix: const Icon(Icons.attachment), suffix: const Icon(Icons.attachment),
isReadOnly: true, isReadOnly: true,
errorMessage: formManager.errors.medicalReport, errorMessage: formManager.errors.medicalReport,
@ -121,7 +123,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
children: formManager.formData.medicalReportImages.asMap().entries.map((entry) { children: formManager.formData.medicalReportImages.asMap().entries.map((entry) {
final index = entry.key; final index = entry.key;
return Chip( return Chip(
label: Text('Medical Report ${index + 1}'.needTranslation), label: Text(LocaleKeys.medicalReportNumber.tr(context: context, namedArgs: {'number': '${index + 1}'})),
deleteIcon: const Icon(Icons.close, size: 16), deleteIcon: const Icon(Icons.close, size: 16),
onDeleted: () { onDeleted: () {
_removeMedicalReport(index, formManager); _removeMedicalReport(index, formManager);
@ -172,7 +174,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
Padding( Padding(
padding: EdgeInsets.all(5.0), padding: EdgeInsets.all(5.0),
child: child:
"Patient is Insured".needTranslation.toText14( LocaleKeys.patientIsInsured.tr(context: context).toText14(
color: Colors.black, color: Colors.black,
weight: FontWeight.w600, weight: FontWeight.w600,
), ),
@ -193,8 +195,8 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
child: TextInputWidget( child: TextInputWidget(
controller: _insuranceController, controller: _insuranceController,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Insurance Document'.needTranslation, hintText: LocaleKeys.insuranceDocument.tr(context: context),
labelText: 'Select Attachment'.needTranslation, labelText: LocaleKeys.selectAttachment.tr(context: context),
suffix: const Icon(Icons.attachment), suffix: const Icon(Icons.attachment),
isReadOnly: true, isReadOnly: true,
errorMessage: formManager.errors.insuredDocument, errorMessage: formManager.errors.insuredDocument,
@ -235,7 +237,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
title: "Select Branch".needTranslation, title: LocaleKeys.selectBranch.tr(context: context),
child: Consumer<HabibWalletViewModel>( child: Consumer<HabibWalletViewModel>(
builder: (context, habibWalletVM, child) { builder: (context, habibWalletVM, child) {
final hospitals = habibWalletVM.advancePaymentHospitals; final hospitals = habibWalletVM.advancePaymentHospitals;

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/validation_utils.dart'; import 'package:hmg_patient_app_new/core/utils/validation_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart'; import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -65,14 +67,14 @@ class PatientInformationStepState extends State<PatientInformationStep> {
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
children: [ children: [
const SizedBox(height: 12), const SizedBox(height: 12),
_buildSectionTitle('Patient information'.needTranslation), _buildSectionTitle(LocaleKeys.patientInfo.tr(context: context)),
const SizedBox(height: 12), const SizedBox(height: 12),
_buildIdentificationField(formManager), _buildIdentificationField(formManager),
_buildPatientNameField(formManager), _buildPatientNameField(formManager),
// _buildPatientCountryField(context, formManager), // _buildPatientCountryField(context, formManager),
_buildPatientPhoneField(formManager), _buildPatientPhoneField(formManager),
const SizedBox(height: 20), const SizedBox(height: 20),
_buildSectionTitle('Where the patient located'.needTranslation), _buildSectionTitle(LocaleKeys.patientLocation.tr(context: context)),
_buildPatientCityField(context, formManager), _buildPatientCityField(context, formManager),
], ],
), ),
@ -94,8 +96,8 @@ class PatientInformationStepState extends State<PatientInformationStep> {
child: TextInputWidget( child: TextInputWidget(
controller: _identificationController, controller: _identificationController,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Enter Identification Number*'.needTranslation, hintText: LocaleKeys.enterIdentificationNumber.tr(context: context),
labelText: 'Identification Number'.needTranslation, labelText: LocaleKeys.identificationNumber.tr(context: context),
errorMessage: formManager.errors.patientIdentification, errorMessage: formManager.errors.patientIdentification,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientIdentification), hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientIdentification),
onChange: (value) { onChange: (value) {
@ -114,8 +116,8 @@ class PatientInformationStepState extends State<PatientInformationStep> {
child: TextInputWidget( child: TextInputWidget(
controller: _nameController, controller: _nameController,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Patient Name*'.needTranslation, hintText: LocaleKeys.patientName.tr(context: context),
labelText: 'Name'.needTranslation, labelText: LocaleKeys.name.tr(context: context),
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
errorMessage: formManager.errors.patientName, errorMessage: formManager.errors.patientName,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientName), hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientName),
@ -133,7 +135,7 @@ class PatientInformationStepState extends State<PatientInformationStep> {
return Focus( return Focus(
focusNode: _phoneFocusNode, focusNode: _phoneFocusNode,
child: TextInputWidget( child: TextInputWidget(
labelText: 'Phone Number'.needTranslation, labelText: LocaleKeys.phoneNumber.tr(context: context),
hintText: "5xxxxxxxx", hintText: "5xxxxxxxx",
controller: _phoneController, controller: _phoneController,
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
@ -159,7 +161,7 @@ class PatientInformationStepState extends State<PatientInformationStep> {
Widget _buildPatientCityField(BuildContext context, ReferralFormManager formManager) { Widget _buildPatientCityField(BuildContext context, ReferralFormManager formManager) {
return DropdownWidget( return DropdownWidget(
labelText: 'City', labelText: 'City',
hintText: formManager.formData.patientCity?.description ?? "Select City".needTranslation, hintText: formManager.formData.patientCity?.description ?? LocaleKeys.selectCity.tr(context: context),
isEnable: false, isEnable: false,
hasSelectionCustomIcon: true, hasSelectionCustomIcon: true,
labelColor: Colors.black, labelColor: Colors.black,
@ -179,7 +181,7 @@ class PatientInformationStepState extends State<PatientInformationStep> {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
title: "Select City".needTranslation, title: LocaleKeys.selectCity.tr(context: context),
child: Consumer<HmgServicesViewModel>( child: Consumer<HmgServicesViewModel>(
builder: (context, hmgServicesVM, child) { builder: (context, hmgServicesVM, child) {
final cities = hmgServicesVM.getAllCitiesList; final cities = hmgServicesVM.getAllCitiesList;

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/validation_utils.dart'; import 'package:hmg_patient_app_new/core/utils/validation_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart'; import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -67,7 +69,7 @@ class RequesterFormStepState extends State<RequesterFormStep> {
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
children: [ children: [
// const SizedBox(height: 12), // const SizedBox(height: 12),
_buildSectionTitle('Referral requester information'.needTranslation), _buildSectionTitle(LocaleKeys.referralRequesterInformation.tr(context: context)),
const SizedBox(height: 12), const SizedBox(height: 12),
_buildNameField(formManager), _buildNameField(formManager),
// _buildPhoneField(formManager), // _buildPhoneField(formManager),
@ -93,8 +95,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
child: TextInputWidget( child: TextInputWidget(
controller: _nameController, controller: _nameController,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Enter Referral Requester Name*'.needTranslation, hintText: LocaleKeys.enterReferralRequesterName.tr(context: context),
labelText: 'Requester Name'.needTranslation, labelText: LocaleKeys.requesterName.tr(context: context),
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
errorMessage: formManager.errors.requesterName, errorMessage: formManager.errors.requesterName,
isAllowLeadingIcon: true, isAllowLeadingIcon: true,
@ -109,10 +111,10 @@ class RequesterFormStepState extends State<RequesterFormStep> {
} }
Widget _buildRelationshipField(BuildContext context, ReferralFormManager formManager) { Widget _buildRelationshipField(BuildContext context, ReferralFormManager formManager) {
return DropdownWidget( return DropdownWidget(
labelText: "Relationship".needTranslation, labelText: LocaleKeys.relationship.tr(context: context),
hintText: formManager.formData.relationship?.textEn ?? "Select Relation".needTranslation, hintText: formManager.formData.relationship?.textEn ?? LocaleKeys.selectRelation.tr(context: context),
isEnable: false, isEnable: false,
selectedValue: formManager.formData.relationship?.textEn ?? "Select Relation".needTranslation, selectedValue: formManager.formData.relationship?.textEn ?? LocaleKeys.selectRelation.tr(context: context),
errorMessage: formManager.errors.relationship, errorMessage: formManager.errors.relationship,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.relationship), hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.relationship),
hasSelectionCustomIcon: false, hasSelectionCustomIcon: false,
@ -132,8 +134,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
controller: _otherNameController, controller: _otherNameController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Other Name*'.needTranslation, hintText: LocaleKeys.otherNameHint.tr(context: context),
labelText: 'Other Name'.needTranslation, labelText: LocaleKeys.otherName.tr(context: context),
errorMessage: formManager.errors.otherRelationshipName, errorMessage: formManager.errors.otherRelationshipName,
onChange: (value) { onChange: (value) {
formManager.updateOtherRelationshipName(value ?? ''); formManager.updateOtherRelationshipName(value ?? '');
@ -152,7 +154,7 @@ class RequesterFormStepState extends State<RequesterFormStep> {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
title: "Select Relation".needTranslation, title: LocaleKeys.selectRelation.tr(context: context),
child: Consumer<HmgServicesViewModel>( child: Consumer<HmgServicesViewModel>(
builder: (context, hmgServicesVM, child) { builder: (context, hmgServicesVM, child) {
if (hmgServicesVM.relationTypes.isEmpty) { if (hmgServicesVM.relationTypes.isEmpty) {

@ -156,18 +156,18 @@ class CallAmbulancePage extends StatelessWidget {
Column( Column(
spacing: 4.h, spacing: 4.h,
children: [ children: [
"Select Pickup Details".needTranslation.toText21( LocaleKeys.selectPickupDetails.tr(context: context).toText21(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
" Please select the details of pickup".needTranslation.toText12( LocaleKeys.pleaseSelectDetailsOfPickup.tr(context: context).toText12(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
) )
], ],
), ),
CustomButton( CustomButton(
text: "Select Details".needTranslation, text: LocaleKeys.selectDetails.tr(context: context),
onPressed: () { onPressed: () {
context.read<EmergencyServicesViewModel>().updateBottomSheetState(BottomSheetType.EXPANDED); context.read<EmergencyServicesViewModel>().updateBottomSheetState(BottomSheetType.EXPANDED);
}) })
@ -256,7 +256,7 @@ class CallAmbulancePage extends StatelessWidget {
height: 40.h, height: 40.h,
backgroundColor: AppColors.lightRedButtonColor, backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent, borderColor: Colors.transparent,
text: "Add new address".needTranslation, text: LocaleKeys.addNewAddress.tr(context: context),
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
onPressed: () {}, onPressed: () {},
@ -265,7 +265,7 @@ class CallAmbulancePage extends StatelessWidget {
return AddressItem( return AddressItem(
isSelected: index == 0, isSelected: index == 0,
address: "Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003", address: "Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003",
title: index == 0 ? "Home".needTranslation : "Work".needTranslation, title: index == 0 ? LocaleKeys.home.tr(context: context) : LocaleKeys.work.tr(context: context),
onTap: () {}, onTap: () {},
); );
} }
@ -309,8 +309,8 @@ class CallAmbulancePage extends StatelessWidget {
Row( Row(
children: [ children: [
hospitalAndPickUpItemContent( hospitalAndPickUpItemContent(
title: "Pick".needTranslation, title: LocaleKeys.pick.tr(context: context),
subTitle: "Inside the home".needTranslation, subTitle: LocaleKeys.insideTheHome.tr(context: context),
leadingIcon: AppAssets.pickup_bed, leadingIcon: AppAssets.pickup_bed,
), ),
CustomSwitch( CustomSwitch(
@ -325,8 +325,8 @@ class CallAmbulancePage extends StatelessWidget {
Row( Row(
children: [ children: [
hospitalAndPickUpItemContent( hospitalAndPickUpItemContent(
title: 'Appointment', title: LocaleKeys.appointment.tr(context: context),
subTitle: "Have any appointment".needTranslation, subTitle: LocaleKeys.haveAnyAppointment.tr(context: context),
leadingIcon: AppAssets.appointment_calendar_icon, leadingIcon: AppAssets.appointment_calendar_icon,
), ),
CustomSwitch( CustomSwitch(
@ -426,7 +426,7 @@ class CallAmbulancePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h, spacing: 4.h,
children: [ children: [
"Total amount to pay".needTranslation.toText18( LocaleKeys.totalAmountToPay.tr(context: context).toText18(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
@ -436,7 +436,7 @@ class CallAmbulancePage extends StatelessWidget {
SizedBox( SizedBox(
width: 4.h, width: 4.h,
), ),
"Amount will be paid at the hospital".needTranslation.toText12( LocaleKeys.amountPaidAtHospital.tr(context: context).toText12(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),
@ -455,7 +455,7 @@ class CallAmbulancePage extends StatelessWidget {
], ],
), ),
CustomButton( CustomButton(
text: "Submit Request".needTranslation, text: LocaleKeys.submitRequest.tr(context: context),
onPressed: () { onPressed: () {
LocationViewModel locationViewModel = context.read<LocationViewModel>(); LocationViewModel locationViewModel = context.read<LocationViewModel>();
GeocodeResponse? response = locationViewModel.geocodeResponse; GeocodeResponse? response = locationViewModel.geocodeResponse;
@ -530,8 +530,8 @@ class CallAmbulancePage extends StatelessWidget {
return SizedBox( return SizedBox(
width: MediaQuery.sizeOf(context).width, width: MediaQuery.sizeOf(context).width,
child: TextInputWidget( child: TextInputWidget(
labelText: "Enter Pickup Location Manually".needTranslation, labelText: LocaleKeys.enterPickupLocationManually.tr(context: context),
hintText: "Enter Pickup Location".needTranslation, hintText: LocaleKeys.enterPickupLocation.tr(context: context),
controller: TextEditingController( controller: TextEditingController(
text: vm.geocodeResponse?.results.first.formattedAddress ?? vm.selectedPrediction?.description, text: vm.geocodeResponse?.results.first.formattedAddress ?? vm.selectedPrediction?.description,
), ),
@ -563,7 +563,7 @@ class CallAmbulancePage extends StatelessWidget {
openLocationInputBottomSheet(BuildContext context) { openLocationInputBottomSheet(BuildContext context) {
context.read<LocationViewModel>().flushSearchPredictions(); context.read<LocationViewModel>().flushSearchPredictions();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
title: "".needTranslation, title: "",
context, context,
child: SizedBox( child: SizedBox(
height: MediaQuery.sizeOf(context).height * .8, height: MediaQuery.sizeOf(context).height * .8,
@ -583,25 +583,22 @@ class CallAmbulancePage extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
hospitalAndPickUpItemContent( hospitalAndPickUpItemContent(
title: "Select Hospital".needTranslation, title: LocaleKeys.selectHospital.tr(context: context),
subTitle: context.read<EmergencyServicesViewModel>().getSelectedHospitalName() ?? "Select Hospital".needTranslation, subTitle: context.read<EmergencyServicesViewModel>().getSelectedHospitalName() ?? LocaleKeys.selectHospital.tr(context: context),
leadingIcon: AppAssets.hospital, leadingIcon: AppAssets.hospital,
), ),
Utils.buildSvgWithAssets(icon: AppAssets.down_cheveron, width: 24.h, height: 24.h).paddingAll(16.h) Utils.buildSvgWithAssets(icon: AppAssets.down_cheveron, width: 24.h, height: 24.h).paddingAll(16.h)
], ],
).onPress(() { ).onPress(() {
print("the item is clicked");
showHospitalBottomSheet(context); showHospitalBottomSheet(context);
}).paddingSymmetrical( }).paddingSymmetrical(
10.w, 10.w, 12.h),
12.h,
),
); );
} }
void openAppointmentList(BuildContext context) { void openAppointmentList(BuildContext context) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
title: "Select Appointment".needTranslation, title: LocaleKeys.selectAppointment.tr(context: context),
context, context,
child: SizedBox( child: SizedBox(
height: MediaQuery.sizeOf(context).height * .5, height: MediaQuery.sizeOf(context).height * .5,

@ -1,9 +1,11 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:lottie/lottie.dart'; import 'package:lottie/lottie.dart';
@ -27,8 +29,7 @@ class RequestingServicesPage extends StatelessWidget {
.center, .center,
Positioned( Positioned(
bottom: 1, bottom: 1,
child: "Submitting your request. \nPlease wait for a moment" child: LocaleKeys.submitRequest.tr(context: context)
.needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w500) .toText16(color: AppColors.textColor, weight: FontWeight.w500)
.paddingOnly(bottom: 100.h, left: 100.h, right: 100.h)) .paddingOnly(bottom: 100.h, left: 100.h, right: 100.h))
], ],

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
@ -9,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart'; import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/AmbulanceRequestOrdersModel.dart'; import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/AmbulanceRequestOrdersModel.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/RRTServiceData.dart'; import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/RRTServiceData.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -60,14 +62,14 @@ class TrackingScreen extends StatelessWidget {
iconSize: 18.w, iconSize: 18.w,
backgroundColor: AppColors.bgGreenColor, backgroundColor: AppColors.bgGreenColor,
borderColor: Colors.transparent, borderColor: Colors.transparent,
text: "Close".needTranslation, text: LocaleKeys.close.tr(context: context),
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
onPressed: () {}, onPressed: () {},
).paddingOnly(left: 16.h, right: 16.h), ).paddingOnly(left: 16.h, right: 16.h),
), ),
), ),
body: CollapsingListView( body: CollapsingListView(
title: "Tracking Details".needTranslation, title: LocaleKeys.trackingDetails.tr(context: context),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
@ -136,7 +138,7 @@ class TrackingScreen extends StatelessWidget {
height: 16, height: 16,
), ),
CustomButton( CustomButton(
text: "Cancel Request".needTranslation, text: LocaleKeys.cancelRequest.tr(context: context),
onPressed: () async { onPressed: () async {
openCancelOrderBottomSheet(context); openCancelOrderBottomSheet(context);
}, },
@ -162,7 +164,7 @@ class TrackingScreen extends StatelessWidget {
iconSize: 18.w, iconSize: 18.w,
backgroundColor: AppColors.lightRedButtonColor, backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent, borderColor: Colors.transparent,
text: "Share Your Live Location on Whatsapp".needTranslation, text: LocaleKeys.shareLocationWhatsapp.tr(context: context),
fontSize: 12.f, fontSize: 12.f,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
@ -280,7 +282,7 @@ class TrackingScreen extends StatelessWidget {
return RichText( return RichText(
text: TextSpan(children: <TextSpan>[ text: TextSpan(children: <TextSpan>[
TextSpan( TextSpan(
text: "Please wait for the call".needTranslation, text: LocaleKeys.pleaseWaitForCall.tr(),
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -288,7 +290,7 @@ class TrackingScreen extends StatelessWidget {
), ),
), ),
TextSpan( TextSpan(
text: "...".needTranslation, text: "...",
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -301,7 +303,7 @@ class TrackingScreen extends StatelessWidget {
return RichText( return RichText(
text: TextSpan(children: <TextSpan>[ text: TextSpan(children: <TextSpan>[
TextSpan( TextSpan(
text: "15:30".needTranslation, text: "15:30",
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -309,7 +311,7 @@ class TrackingScreen extends StatelessWidget {
), ),
), ),
TextSpan( TextSpan(
text: " mins ".needTranslation, text: LocaleKeys.mins.tr(),
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -317,7 +319,7 @@ class TrackingScreen extends StatelessWidget {
), ),
), ),
TextSpan( TextSpan(
text: "to hospital".needTranslation, text: LocaleKeys.toHospitalLower.tr(),
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -328,7 +330,7 @@ class TrackingScreen extends StatelessWidget {
); );
case OrderTrackingState.ended: case OrderTrackingState.ended:
return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.arrived.tr().toText21(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.failed: case OrderTrackingState.failed:
case OrderTrackingState.cancel: case OrderTrackingState.cancel:
return SizedBox.shrink(); return SizedBox.shrink();
@ -386,8 +388,8 @@ class TrackingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h, spacing: 4.h,
children: [ children: [
"Contact".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w600), LocaleKeys.contact.tr().toText14(color: AppColors.textColor, weight: FontWeight.w600),
"0115259555".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500).onPress((){ "0115259555".toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500).onPress((){
launchUrl( launchUrl(
Uri.parse("tel://0115259555"), Uri.parse("tel://0115259555"),
); );
@ -429,23 +431,24 @@ class TrackingScreen extends StatelessWidget {
// } // }
getTitle(OrderTrackingState? state) { getTitle(OrderTrackingState? state) {
if(state == null) if(state == null) {
return "Failed".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.failed.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
}
switch (state) { switch (state) {
case OrderTrackingState.waitingForCall: case OrderTrackingState.waitingForCall:
return "Confirmation Call".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.confirmationCall.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.dispactched: case OrderTrackingState.dispactched:
return "Pickup Up from Home".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.pickupFromHome.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.returning: case OrderTrackingState.returning:
return " On The Way To Hospital".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.onTheWayToHospital.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.ended: case OrderTrackingState.ended:
return "Arrived at Hospital".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.arrivedAtHospital.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.failed: case OrderTrackingState.failed:
return "Failed".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.failed.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.cancel: case OrderTrackingState.cancel:
return "Order Cancel".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600); return LocaleKeys.orderCancel.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
} }
} }

@ -21,14 +21,12 @@ class PickupLocation extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Select Pickup Direction" LocaleKeys.selectPickupDirection.tr(context: context)
.needTranslation
.toText24(color: AppColors.textColor, isBold: true), .toText24(color: AppColors.textColor, isBold: true),
SizedBox( SizedBox(
height: 16.h, height: 16.h,
), ),
"Select Direction" LocaleKeys.selectDirection.tr(context: context)
.needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600), .toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox( SizedBox(
height: 12.h, height: 12.h,
@ -58,8 +56,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor, activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor), fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
), ),
"To Hospital" LocaleKeys.toHospital.tr(context: context)
.needTranslation
.toText14(color: AppColors.textColor, weight: FontWeight.w500) .toText14(color: AppColors.textColor, weight: FontWeight.w500)
], ],
).onPress(() { ).onPress(() {
@ -84,8 +81,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor, activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor), fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
), ),
"From Hospital" LocaleKeys.fromHospital.tr(context: context)
.needTranslation
.toText14(color: AppColors.textColor, weight: FontWeight.w500) .toText14(color: AppColors.textColor, weight: FontWeight.w500)
], ],
).onPress(() { ).onPress(() {
@ -105,8 +101,7 @@ class PickupLocation extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Select Way" LocaleKeys.selectWay.tr(context: context)
.needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600), .toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(height: 12.h), SizedBox(height: 12.h),
Row( Row(
@ -128,8 +123,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor, activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor), fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
), ),
"One Way" LocaleKeys.oneWay.tr(context: context)
.needTranslation
.toText12(color: AppColors.textColor, fontWeight: FontWeight.w500) .toText12(color: AppColors.textColor, fontWeight: FontWeight.w500)
], ],
).onPress(() { ).onPress(() {
@ -154,8 +148,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor, activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor), fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
), ),
"Two Way" LocaleKeys.twoWay.tr(context: context)
.needTranslation
.toText14(color: AppColors.textColor, weight: FontWeight.w500) .toText14(color: AppColors.textColor, weight: FontWeight.w500)
], ],
).onPress(() { ).onPress(() {

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
@ -27,7 +29,7 @@ class TypeSelectionWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "All Facilities".needTranslation, labelText: LocaleKeys.all.tr(context: context),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: selectedFacility == FacilitySelection.ALL color: selectedFacility == FacilitySelection.ALL
@ -50,7 +52,7 @@ class TypeSelectionWidget extends StatelessWidget {
child: AppCustomChipWidget( child: AppCustomChipWidget(
icon: AppAssets.hmg, icon: AppAssets.hmg,
iconHasColor: false, iconHasColor: false,
labelText: "Hospitals".needTranslation, labelText: LocaleKeys.hmgHospitals.tr(context: context),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: selectedFacility == FacilitySelection.HMG color: selectedFacility == FacilitySelection.HMG
@ -74,7 +76,7 @@ class TypeSelectionWidget extends StatelessWidget {
child: AppCustomChipWidget( child: AppCustomChipWidget(
icon: AppAssets.hmc, icon: AppAssets.hmc,
iconHasColor: false, iconHasColor: false,
labelText: "Medical Centers".needTranslation, labelText: LocaleKeys.hmcMedicalClinic.tr(context: context),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: selectedFacility == FacilitySelection.HMC color: selectedFacility == FacilitySelection.HMC

Loading…
Cancel
Save