Translation updates

pull/162/head
haroon amjad 6 days ago
parent f026ae1d62
commit 39af08ddc3

@ -1368,5 +1368,72 @@
"readMore": "اقرأ المزيد",
"riskFactors": "عوامل الخطر",
"noRiskFactorsFound": "لم يتم العثور على عوامل خطر",
"basedOnYourSelectedSymptomsNoRiskFactors": "بناءً على الأعراض المحددة، لم يتم تحديد عوامل خطر إضافية."
}
"basedOnYourSelectedSymptomsNoRiskFactors": "بناءً على الأعراض المحددة، لم يتم تحديد عوامل خطر إضافية.",
"messageNotification": "الرسالة",
"attachedImage": "الصورة المرفقة",
"failedToLoadImage": "فشل تحميل الصورة",
"typeNotification": "النوع",
"pleaseSelectAtLeastOneOptionBeforeProceeding": "يرجى اختيار خيار واحد على الأقل قبل المتابعة",
"suggestions": "الاقتراحات",
"pleaseGoBackAndSelectOrgansFirst": "يرجى العودة واختيار الأعضاء أولاً",
"symptomsSelector": "محدد الأعراض",
"emergencyTriage": "طوارئ",
"emergencyEvidenceDetected": "تم اكتشاف دليل طوارئ. يرجى طلب العناية الطبية.",
"noQuestionItemsAvailable": "لا توجد عناصر أسئلة متاحة",
"pleaseAnswerAllQuestionsBeforeProceeding": "يرجى الإجابة على جميع الأسئلة قبل المتابعة",
"triage": "الفرز",
"areYouSureYouWantToExitProgress": "هل أنت متأكد أنك تريد الخروج؟ سيتم فقدان تقدمك.",
"noQuestionAvailable": "لا يوجد سؤال متاح",
"possibleSymptom": "عرض محتمل: ",
"symptomsCheckerFindingScore": "- درجة نتائج فاحص الأعراض",
"notSet": "غير محدد",
"years": "سنوات",
"symptomsChecker": "فاحص الأعراض",
"helloIsYourInformationUpToDate": "مرحباً {name}، هل معلوماتك محدثة؟",
"noEditAll": "لا، تعديل الكل",
"yesItIs": "نعم، إنها كذلك",
"age": "العمر",
"youDontHaveAnyAncillaryOrdersYet": "ليس لديك أي طلبات مساعدة بعد.",
"invoiceWithNumber": "الفاتورة: {invoiceNo}",
"queued": "في قائمة الانتظار",
"checkInReady": "جاهز للتسجيل",
"checkIn": "تسجيل الوصول",
"viewDetails": "عرض التفاصيل",
"selectPaymentMethod": "اختر طريقة الدفع",
"processingPaymentPleaseWait": "جاري معالجة الدفع، يرجى الانتظار...",
"finalizingPaymentPleaseWait": "جاري إتمام الدفع، يرجى الانتظار...",
"generatingInvoicePleaseWait": "جاري إنشاء الفاتورة، يرجى الانتظار...",
"hereIsYourInvoiceNumber": "هذا هو رقم فاتورتك #: ",
"paymentCompletedSuccessfully": "تم الدفع بنجاح",
"failedToInitializeApplePay": "فشل في تهيئة Apple Pay. يرجى المحاولة مرة أخرى.",
"cash": "نقدي",
"approved": "موافق عليه",
"approvalRejectedPleaseVisitReceptionist": "تم رفض الموافقة - يرجى زيارة موظف الاستقبال",
"sentForApproval": "تم إرساله للموافقة",
"ancillaryOrderDetails": "تفاصيل الطلب المساعد",
"noProceduresAvailableForSelectedOrder": "لا توجد إجراءات متاحة للطلب المحدد.",
"procedures": "الإجراءات",
"totalAmount": "المبلغ الإجمالي",
"covered": "مغطى",
"vatPercent": "ضريبة القيمة المضافة (15%)",
"proceedToPayment": "المتابعة للدفع",
"supportedSmartWatches": "الساعات الذكية المدعومة",
"pleaseMakeSureSamsungWatchConnected": "يرجى التأكد من أن ساعة Samsung الخاصة بك متصلة بهاتفك، ومتزامنة ومحدثة بشكل نشط.",
"beforeSyncingDataFollowInstructions": "قبل مزامنة البيانات، يرجى التأكد من اتباع التعليمات بشكل صحيح.",
"viewWatchInstructions": "عرض تعليمات الساعة",
"healthConnectAppNotInstalled": "يبدو أنه ليس لديك تطبيق Health Connect مثبتًا. يرجى تثبيته من متجر Play لمزامنة بيانات صحتك.",
"setTimerOfReminder": "ضبط مؤقت التذكير",
"youHaveAppointmentWithDr": "لديك موعد مع د. ",
"hours": "ساعات",
"secs": "ثواني",
"noAllergiesDataFound": "لم يتم العثور على بيانات الحساسية...",
"heartRateDescription": "معدل ضربات قلبك يشير إلى عدد المرات التي ينبض فيها قلبك في الدقيقة",
"bloodOxygenDescription": "مستوى الأكسجين في الدم يشير إلى كمية الأكسجين التي تحملها خلايا الدم الحمراء",
"stepsDescription": "عدد الخطوات المتخذة على مدار اليوم",
"caloriesDescription": "السعرات الحرارية المحروقة أثناء النشاط البدني",
"distanceDescription": "المسافة المقطوعة على مدار اليوم",
"overview": "نظرة عامة",
"details": "التفاصيل",
"healthy": "صحي",
"warning": "تحذير"
}

@ -1361,5 +1361,72 @@
"readMore": "Read more",
"riskFactors": "Risk Factors",
"noRiskFactorsFound": "No risk factors found",
"basedOnYourSelectedSymptomsNoRiskFactors": "Based on your selected symptoms, no additional risk factors were identified."
"basedOnYourSelectedSymptomsNoRiskFactors": "Based on your selected symptoms, no additional risk factors were identified.",
"messageNotification": "Message",
"attachedImage": "Attached Image",
"failedToLoadImage": "Failed to load image",
"typeNotification": "Type",
"pleaseSelectAtLeastOneOptionBeforeProceeding": "Please select at least one option before proceeding",
"suggestions": "Suggestions",
"pleaseGoBackAndSelectOrgansFirst": "Please go back and select organs first",
"symptomsSelector": "Symptoms Selector",
"emergencyTriage": "Emergency",
"emergencyEvidenceDetected": "Emergency evidence detected. Please seek medical attention.",
"noQuestionItemsAvailable": "No question items available",
"pleaseAnswerAllQuestionsBeforeProceeding": "Please answer all questions before proceeding",
"triage": "Triage",
"areYouSureYouWantToExitProgress": "Are you sure you want to exit? Your progress will be lost.",
"noQuestionAvailable": "No question available",
"possibleSymptom": "Possible symptom: ",
"symptomsCheckerFindingScore": "- Symptoms checker finding score",
"notSet": "Not set",
"years": "Years",
"symptomsChecker": "Symptoms Checker",
"helloIsYourInformationUpToDate": "Hello {name}, Is your information up to date?",
"noEditAll": "No, Edit all",
"yesItIs": "Yes, It is",
"age": "Age",
"youDontHaveAnyAncillaryOrdersYet": "You don't have any ancillary orders yet.",
"invoiceWithNumber": "Invoice: {invoiceNo}",
"queued": "Queued",
"checkInReady": "Check-in Ready",
"checkIn": "Check In",
"viewDetails": "View Details",
"selectPaymentMethod": "Select Payment Method",
"processingPaymentPleaseWait": "Processing payment, Please wait...",
"finalizingPaymentPleaseWait": "Finalizing payment, Please wait...",
"generatingInvoicePleaseWait": "Generating invoice, Please wait...",
"hereIsYourInvoiceNumber": "Here is your invoice #: ",
"paymentCompletedSuccessfully": "Payment Completed Successfully",
"failedToInitializeApplePay": "Failed to initialize Apple Pay. Please try again.",
"cash": "Cash",
"approved": "Approved",
"approvalRejectedPleaseVisitReceptionist": "Approval Rejected - Please visit receptionist",
"sentForApproval": "Sent For Approval",
"ancillaryOrderDetails": "Ancillary Order Details",
"noProceduresAvailableForSelectedOrder": "No Procedures available for the selected order.",
"procedures": "Procedures",
"totalAmount": "Total Amount",
"covered": "Covered",
"vatPercent": "VAT (15%)",
"proceedToPayment": "Proceed to Payment",
"supportedSmartWatches": "Supported Smart Watches",
"pleaseMakeSureSamsungWatchConnected": "Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.",
"beforeSyncingDataFollowInstructions": "Before syncing data, please make sure that you have followed the instructions properly.",
"viewWatchInstructions": "View watch instructions",
"healthConnectAppNotInstalled": "Seems like you do not have Health Connect App installed. Please install it from the Play Store to sync your health data.",
"setTimerOfReminder": "Set the timer of reminder",
"youHaveAppointmentWithDr": "You have appointment with Dr. ",
"hours": "Hours",
"secs": "Secs",
"noAllergiesDataFound": "No allergies data found...",
"heartRateDescription": "Your heart rate indicates how many times your heart beats per minute",
"bloodOxygenDescription": "Blood oxygen level indicates how much oxygen your red blood cells are carrying",
"stepsDescription": "Number of steps taken throughout the day",
"caloriesDescription": "Calories burned during physical activity",
"distanceDescription": "Distance covered throughout the day",
"overview": "Overview",
"details": "Details",
"healthy": "Healthy",
"warning": "Warning"
}

@ -1363,5 +1363,72 @@ abstract class LocaleKeys {
static const riskFactors = 'riskFactors';
static const noRiskFactorsFound = 'noRiskFactorsFound';
static const basedOnYourSelectedSymptomsNoRiskFactors = 'basedOnYourSelectedSymptomsNoRiskFactors';
static const messageNotification = 'messageNotification';
static const attachedImage = 'attachedImage';
static const failedToLoadImage = 'failedToLoadImage';
static const typeNotification = 'typeNotification';
static const pleaseSelectAtLeastOneOptionBeforeProceeding = 'pleaseSelectAtLeastOneOptionBeforeProceeding';
static const suggestions = 'suggestions';
static const pleaseGoBackAndSelectOrgansFirst = 'pleaseGoBackAndSelectOrgansFirst';
static const symptomsSelector = 'symptomsSelector';
static const emergencyTriage = 'emergencyTriage';
static const emergencyEvidenceDetected = 'emergencyEvidenceDetected';
static const noQuestionItemsAvailable = 'noQuestionItemsAvailable';
static const pleaseAnswerAllQuestionsBeforeProceeding = 'pleaseAnswerAllQuestionsBeforeProceeding';
static const triage = 'triage';
static const areYouSureYouWantToExitProgress = 'areYouSureYouWantToExitProgress';
static const noQuestionAvailable = 'noQuestionAvailable';
static const possibleSymptom = 'possibleSymptom';
static const symptomsCheckerFindingScore = 'symptomsCheckerFindingScore';
static const notSet = 'notSet';
static const years = 'years';
static const symptomsChecker = 'symptomsChecker';
static const helloIsYourInformationUpToDate = 'helloIsYourInformationUpToDate';
static const noEditAll = 'noEditAll';
static const yesItIs = 'yesItIs';
static const age = 'age';
static const youDontHaveAnyAncillaryOrdersYet = 'youDontHaveAnyAncillaryOrdersYet';
static const invoiceWithNumber = 'invoiceWithNumber';
static const queued = 'queued';
static const checkInReady = 'checkInReady';
static const checkIn = 'checkIn';
static const viewDetails = 'viewDetails';
static const selectPaymentMethod = 'selectPaymentMethod';
static const processingPaymentPleaseWait = 'processingPaymentPleaseWait';
static const finalizingPaymentPleaseWait = 'finalizingPaymentPleaseWait';
static const generatingInvoicePleaseWait = 'generatingInvoicePleaseWait';
static const hereIsYourInvoiceNumber = 'hereIsYourInvoiceNumber';
static const paymentCompletedSuccessfully = 'paymentCompletedSuccessfully';
static const failedToInitializeApplePay = 'failedToInitializeApplePay';
static const cash = 'cash';
static const approved = 'approved';
static const approvalRejectedPleaseVisitReceptionist = 'approvalRejectedPleaseVisitReceptionist';
static const sentForApproval = 'sentForApproval';
static const ancillaryOrderDetails = 'ancillaryOrderDetails';
static const noProceduresAvailableForSelectedOrder = 'noProceduresAvailableForSelectedOrder';
static const procedures = 'procedures';
static const totalAmount = 'totalAmount';
static const covered = 'covered';
static const vatPercent = 'vatPercent';
static const proceedToPayment = 'proceedToPayment';
static const supportedSmartWatches = 'supportedSmartWatches';
static const pleaseMakeSureSamsungWatchConnected = 'pleaseMakeSureSamsungWatchConnected';
static const beforeSyncingDataFollowInstructions = 'beforeSyncingDataFollowInstructions';
static const viewWatchInstructions = 'viewWatchInstructions';
static const healthConnectAppNotInstalled = 'healthConnectAppNotInstalled';
static const setTimerOfReminder = 'setTimerOfReminder';
static const youHaveAppointmentWithDr = 'youHaveAppointmentWithDr';
static const hours = 'hours';
static const secs = 'secs';
static const noAllergiesDataFound = 'noAllergiesDataFound';
static const heartRateDescription = 'heartRateDescription';
static const bloodOxygenDescription = 'bloodOxygenDescription';
static const stepsDescription = 'stepsDescription';
static const caloriesDescription = 'caloriesDescription';
static const distanceDescription = 'distanceDescription';
static const overview = 'overview';
static const details = 'details';
static const healthy = 'healthy';
static const warning = 'warning';
}

@ -123,7 +123,7 @@ class AllergiesListPage extends StatelessWidget {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "No allergies data found...".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noAllergiesDataFound.tr());
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),

@ -1,12 +1,13 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_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/widgets/appbar/collapsing_list_view.dart';
import 'package:intl/intl.dart';
import 'package:share_plus/share_plus.dart';
class NotificationDetailsPage extends StatelessWidget {
@ -28,7 +29,7 @@ class NotificationDetailsPage extends StatelessWidget {
print('========================');
return CollapsingListView(
title: "Notification Details".needTranslation,
title: LocaleKeys.notificationDetails.tr(),
trailing: IconButton(
icon: Icon(
Icons.share_outlined,
@ -115,7 +116,7 @@ class NotificationDetailsPage extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'Message'.needTranslation.toText14(
LocaleKeys.messageNotification.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
@ -153,7 +154,7 @@ class NotificationDetailsPage extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'Attached Image'.needTranslation.toText14(
LocaleKeys.attachedImage.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
@ -183,7 +184,7 @@ class NotificationDetailsPage extends StatelessWidget {
color: AppColors.greyTextColor,
),
SizedBox(height: 8.h),
'Failed to load image'.needTranslation.toText12(
LocaleKeys.failedToLoadImage.tr().toText12(
color: AppColors.greyTextColor,
),
SizedBox(height: 4.h),
@ -233,7 +234,7 @@ class NotificationDetailsPage extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'Type'.needTranslation.toText14(
LocaleKeys.typeNotification.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),

@ -38,7 +38,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Supported Smart Watches".needTranslation.toText20(isBold: true),
LocaleKeys.supportedSmartWatches.tr().toText20(isBold: true),
SizedBox(height: 16.h),
Row(
children: [
@ -161,15 +161,15 @@ class SmartwatchInstructionsPage extends StatelessWidget {
),
),
SizedBox(height: 12),
"Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.".needTranslation.toText14(isBold: true),
SizedBox(height: 12),
"Before syncing data, please make sure that you have followed the instructions properly.".needTranslation.toText14(isBold: true),
LocaleKeys.pleaseMakeSureSamsungWatchConnected.tr().toText14(isBold: true),
SizedBox(height: 8.h),
LocaleKeys.beforeSyncingDataFollowInstructions.tr().toText14(isBold: true),
SizedBox(height: 12),
InkWell(
onTap: () {
showInstructionsDialog(context);
},
child: "View watch instructions".needTranslation.toText12(isBold: true, color: AppColors.textColor, isUnderLine: true)),
child: LocaleKeys.viewWatchInstructions.tr().toText12(isBold: true, color: AppColors.textColor, isUnderLine: true)),
SizedBox(
height: 130.h,
),
@ -186,7 +186,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
);
} else {
getIt.get<DialogService>().showErrorBottomSheet(
message: "Seems like you do not have Health Connect App installed. Please install it from the Play Store to sync your health data.".needTranslation,
message: LocaleKeys.healthConnectAppNotInstalled.tr(),
onOkPressed: () {
Navigator.pop(context);
Uri uri = Uri.parse("https://play.google.com/store/apps/details?id=com.google.android.apps.healthdata");

@ -1,8 +1,10 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:health/health.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class HealthMetricInfo {
@ -39,7 +41,7 @@ class HealthMetrics {
unit: 'BPM',
color: AppColors.primaryRedColor,
icon: Icons.favorite,
description: "Your heart rate indicates how many times your heart beats per minute".needTranslation,
description: LocaleKeys.heartRateDescription.tr(),
minHealthyValue: 60,
maxHealthyValue: 100,
svgIcon: "assets/images/smartwatches/heartrate_icon.svg"),
@ -51,7 +53,7 @@ class HealthMetrics {
// color: Colors.blue,
color: Color(0xff3A3558),
icon: Icons.air,
description: "Blood oxygen level indicates how much oxygen your red blood cells are carrying".needTranslation,
description: LocaleKeys.bloodOxygenDescription.tr(),
minHealthyValue: 95,
maxHealthyValue: 100,
svgIcon: "assets/images/smartwatches/bloodoxygen_icon.svg"),

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/extensions/route_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/features/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -46,7 +48,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
context.navigateWithName(AppRoutes.triagePage);
} else {
dialogService.showErrorBottomSheet(
message: 'Please select at least one option before proceeding'.needTranslation,
message: LocaleKeys.pleaseSelectAtLeastOneOptionBeforeProceeding.tr(),
);
}
}
@ -192,7 +194,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
children: [
Expanded(
child: CollapsingListView(
title: "Suggestions".needTranslation,
title: LocaleKeys.suggestions.tr(),
leadingCallback: () => context.pop(),
child: viewModel.isSuggestionsLoading
? _buildLoadingShimmer()
@ -225,7 +227,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor),
SizedBox(height: 16.h),
Text(
'No organs selected'.needTranslation,
LocaleKeys.noOrgansSelected.tr(),
style: TextStyle(
fontSize: 18.f,
fontWeight: FontWeight.w600,
@ -234,7 +236,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
),
SizedBox(height: 8.h),
Text(
'Please go back and select organs first'.needTranslation,
LocaleKeys.pleaseGoBackAndSelectOrgansFirst.tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.f,
@ -258,7 +260,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
children: [
Expanded(
child: CustomButton(
text: "Previous".needTranslation,
text: LocaleKeys.previous.tr(),
onPressed: _onPreviousPressed,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent,
@ -269,7 +271,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(),
onPressed: () => _onNextPressed(viewModel),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,

@ -44,7 +44,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
context.navigateWithName(AppRoutes.riskFactorsPage);
} else {
dialogService.showErrorBottomSheet(
message: 'Please select at least one symptom before proceeding'.needTranslation,
message: LocaleKeys.pleaseSelectAtLeastOneOptionBeforeProceeding.tr(),
);
}
}
@ -58,7 +58,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: "Are you sure you want to restart the organ selection?".needTranslation,
loadingText: LocaleKeys.areYouSureYouWantToRestartOrganSelection.tr(),
isShowActionButtons: true,
onCancelTap: () => Navigator.pop(context),
onConfirmTap: () => onConfirm(),
@ -79,7 +79,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Symptoms Selector".needTranslation,
title: LocaleKeys.symptomsSelector.tr(),
leadingCallback: () => _buildConfirmationBottomSheet(
context: context,
onConfirm: () => {
@ -252,7 +252,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor),
SizedBox(height: 16.h),
Text(
'No organs selected'.needTranslation,
LocaleKeys.noOrgansSelected.tr(context: context),
style: TextStyle(
fontSize: 18.f,
fontWeight: FontWeight.w600,
@ -261,7 +261,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
),
SizedBox(height: 8.h),
Text(
'Please go back and select organs first'.needTranslation,
LocaleKeys.pleaseGoBackAndSelectOrgansFirst.tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.f,
@ -285,7 +285,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
children: [
Expanded(
child: CustomButton(
text: "Previous".needTranslation,
text: LocaleKeys.previous.tr(context: context),
onPressed: _onPreviousPressed,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent,
@ -296,7 +296,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () => _onNextPressed(viewModel),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,

@ -117,10 +117,9 @@ class _TriagePageState extends State<TriagePage> {
Lottie.asset(AppAnimations.ambulanceAlert,
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h),
"Emergency".needTranslation.toText28(color: AppColors.whiteColor, isBold: true),
LocaleKeys.emergencyTriage.tr(context: context).toText28(color: AppColors.whiteColor, isBold: true),
SizedBox(height: 8.h),
"Emergency evidence detected. Please seek medical attention."
.needTranslation
LocaleKeys.emergencyEvidenceDetected.tr(context: context)
.toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
@ -159,14 +158,14 @@ class _TriagePageState extends State<TriagePage> {
final currentQuestion = viewModel.currentTriageQuestion;
if (currentQuestion?.items == null || currentQuestion!.items!.isEmpty) {
dialogService.showErrorBottomSheet(
message: 'No question items available'.needTranslation,
message: LocaleKeys.noQuestionItemsAvailable.tr(context: context),
);
return;
}
// Check if all items have been answered
if (!viewModel.areAllTriageItemsAnswered) {
dialogService.showErrorBottomSheet(message: 'Please answer all questions before proceeding'.needTranslation);
dialogService.showErrorBottomSheet(message: LocaleKeys.pleaseAnswerAllQuestionsBeforeProceeding.tr(context: context));
return;
}
@ -222,7 +221,7 @@ class _TriagePageState extends State<TriagePage> {
children: [
Expanded(
child: CollapsingListView(
title: "Triage".needTranslation,
title: LocaleKeys.triage.tr(context: context),
leadingCallback: () => _showConfirmationBeforeExit(context),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -304,7 +303,7 @@ class _TriagePageState extends State<TriagePage> {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: "Are you sure you want to exit? Your progress will be lost.".needTranslation,
loadingText: LocaleKeys.areYouSureYouWantToExitProgress.tr(context: context),
isShowActionButtons: true,
onCancelTap: () => Navigator.pop(context),
onConfirmTap: () {
@ -325,7 +324,7 @@ class _TriagePageState extends State<TriagePage> {
if (viewModel.currentTriageQuestion == null) {
return Center(
child: "No question available".needTranslation.toText16(weight: FontWeight.w500),
child: LocaleKeys.noQuestionAvailable.tr(context: context).toText16(weight: FontWeight.w500),
);
}
@ -457,7 +456,7 @@ class _TriagePageState extends State<TriagePage> {
children: [
RichText(
text: TextSpan(
text: "Possible symptom: ".needTranslation,
text: LocaleKeys.possibleSymptom.tr(context: context),
style: TextStyle(
color: AppColors.greyTextColor,
fontWeight: FontWeight.w600,
@ -492,7 +491,7 @@ class _TriagePageState extends State<TriagePage> {
),
children: [
TextSpan(
text: "- Symptoms checker finding score".needTranslation,
text: LocaleKeys.symptomsCheckerFindingScore.tr(context: context),
style: TextStyle(
color: AppColors.textColor,
fontWeight: FontWeight.w500,
@ -510,7 +509,7 @@ class _TriagePageState extends State<TriagePage> {
children: [
Expanded(
child: CustomButton(
text: "Previous".needTranslation,
text: LocaleKeys.previous.tr(context: context),
onPressed: isFirstQuestion ? () {} : _onPreviousPressed,
isDisabled: isFirstQuestion || viewModel.isTriageDiagnosisLoading,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
@ -522,7 +521,7 @@ class _TriagePageState extends State<TriagePage> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
isDisabled: viewModel.isTriageDiagnosisLoading,
onPressed: _onNextPressed,
backgroundColor: AppColors.primaryRedColor,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -9,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/route_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/features/symptoms_checker/symptoms_checker_view_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/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -149,20 +151,20 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
viewModel.selectedWeight == null;
// Get display values
String genderText = viewModel.selectedGender ?? "Not set";
String genderText = viewModel.selectedGender ?? LocaleKeys.notSet.tr(context: context);
// Show age calculated from DOB (prefer viewModel's age, fallback to calculated from user's DOB)
int? displayAge = viewModel.selectedAge ?? userAgeFromDOB;
String ageText = displayAge != null ? "$displayAge Years" : "Not set";
String ageText = displayAge != null ? "$displayAge ${LocaleKeys.years.tr(context: context)}" : LocaleKeys.notSet.tr(context: context);
String heightText =
viewModel.selectedHeight != null ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" : "Not set";
viewModel.selectedHeight != null ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" : LocaleKeys.notSet.tr(context: context);
String weightText =
viewModel.selectedWeight != null ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" : "Not set";
viewModel.selectedWeight != null ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" : LocaleKeys.notSet.tr(context: context);
return Column(
children: [
Expanded(
child: CollapsingListView(
title: "Symptoms Checker".needTranslation,
title: LocaleKeys.symptomsChecker.tr(context: context),
isLeading: true,
child: SingleChildScrollView(
child: Column(
@ -173,7 +175,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
padding: EdgeInsets.symmetric(vertical: 24.h, horizontal: 16.w),
child: Column(
children: [
"Hello $name, Is your information up to date?".needTranslation.toText16(
LocaleKeys.helloIsYourInformationUpToDate.tr(namedArgs: {'name': name}).toText16(
weight: FontWeight.w600,
color: AppColors.textColor,
),
@ -181,7 +183,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.genderIcon,
title: "Gender".needTranslation,
title: LocaleKeys.gender.tr(context: context),
subTitle: genderText,
onTap: () {
viewModel.setUserInfoPage(0, isSinglePageEdit: true);
@ -193,7 +195,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.calendarGrey,
title: "Age".needTranslation,
title: LocaleKeys.age.tr(context: context),
subTitle: ageText,
iconColor: AppColors.greyTextColor,
onTap: () {
@ -206,7 +208,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.rulerIcon,
title: "Height".needTranslation,
title: LocaleKeys.height.tr(context: context),
subTitle: heightText,
onTap: () {
viewModel.setUserInfoPage(2, isSinglePageEdit: true);
@ -218,7 +220,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.weightScale,
title: "Weight".needTranslation,
title: LocaleKeys.weight.tr(context: context),
subTitle: weightText,
onTap: () {
viewModel.setUserInfoPage(3, isSinglePageEdit: true);
@ -255,7 +257,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
children: [
Expanded(
child: CustomButton(
text: "No, Edit all".needTranslation,
text: LocaleKeys.noEditAll.tr(context: context),
icon: AppAssets.edit_icon,
iconColor: AppColors.primaryRedColor,
onPressed: () {
@ -271,7 +273,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Yes, It is".needTranslation,
text: LocaleKeys.yesItIs.tr(context: context),
icon: AppAssets.tickIcon,
iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
onPressed: hasEmptyFields

@ -83,7 +83,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Select Payment Method".needTranslation,
title: LocaleKeys.selectPaymentMethod.tr(context: context),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -103,9 +103,9 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h).toShimmer2(isShow: todoVM.isProcessingPayment),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
LocaleKeys.mada.tr(context: context).toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
],
),
SizedBox(width: 8.h),
@ -152,7 +152,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
],
).toShimmer2(isShow: todoVM.isProcessingPayment),
SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
],
),
SizedBox(width: 8.h),
@ -210,14 +210,14 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
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),
// Amount before tax
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText14(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
amountBeforeTax.toStringAsFixed(2).toText16(isBold: true),
AppColors.blackColor,
@ -231,7 +231,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
taxAmount.toStringAsFixed(2).toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
@ -247,7 +247,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
widget.totalAmount.toStringAsFixed(2).toText24(isBold: true),
AppColors.blackColor,
@ -346,7 +346,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
}
void _checkPaymentStatus() {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
todoSectionViewModel.checkPaymentStatus(
transID: transID,
@ -384,7 +384,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
required String paymentReference,
required String paymentMethod,
}) {
LoaderBottomSheet.showLoader(loadingText: "Processing payment, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.processingPaymentPleaseWait.tr(context: context));
final user = appState.getAuthenticatedUser();
@ -426,7 +426,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
required String advanceNumber,
required String paymentReference,
}) {
LoaderBottomSheet.showLoader(loadingText: "Finalizing payment, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.finalizingPaymentPleaseWait.tr(context: context));
final user = appState.getAuthenticatedUser();
@ -450,7 +450,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
}
void _autoGenerateInvoice() {
LoaderBottomSheet.showLoader(loadingText: "Generating invoice, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.generatingInvoicePleaseWait.tr(context: context));
List<dynamic> selectedProcListAPI = widget.selectedProcedures.map((element) {
return {
@ -496,7 +496,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
children: [
Row(
children: [
"Here is your invoice #: ".needTranslation.toText14(
LocaleKeys.hereIsYourInvoiceNumber.tr(context: context).toText14(
color: AppColors.textColorLight,
weight: FontWeight.w500,
),
@ -510,7 +510,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Expanded(
child: CustomButton(
height: 56.h,
text: LocaleKeys.ok.tr(),
text: LocaleKeys.ok.tr(context: context),
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
@ -528,8 +528,8 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
),
],
),
// title: "Payment Completed Successfully".needTranslation,
titleWidget: Utils.getSuccessWidget(loadingText: "Payment Completed Successfully".needTranslation),
// title: LocaleKeys.paymentCompletedSuccessfully.tr(context: context),
titleWidget: Utils.getSuccessWidget(loadingText: LocaleKeys.paymentCompletedSuccessfully.tr(context: context)),
isCloseButtonVisible: false,
isDismissible: false,
isFullScreen: false,
@ -607,7 +607,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Navigator.of(context).pop();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Failed to initialize Apple Pay. Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.failedToInitializeApplePay.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -102,14 +102,14 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
String _getApprovalStatusText(AncillaryOrderProcDetail procedure) {
if (procedure.isApprovalRequired == false) {
return "Cash";
return LocaleKeys.cash.tr(context: context);
} else {
if (procedure.isApprovalCreated == true && procedure.approvalNo != 0) {
return "Approved";
return LocaleKeys.approved.tr(context: context);
} else if (procedure.isApprovalRequired == true && procedure.isApprovalCreated == true && procedure.approvalNo == 0) {
return "Approval Rejected - Please visit receptionist";
return LocaleKeys.approvalRejectedPleaseVisitReceptionist.tr(context: context);
} else {
return "Sent For Approval";
return LocaleKeys.sentForApproval.tr(context: context);
}
}
}
@ -135,7 +135,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
children: [
Expanded(
child: CollapsingListView(
title: "Ancillary Order Details".needTranslation,
title: LocaleKeys.ancillaryOrderDetails.tr(context: context),
child: viewModel.isAncillaryDetailsProceduresLoading
? _buildLoadingShimmer().paddingSymmetrical(24.w, 0)
: viewModel.patientAncillaryOrderProceduresList.isEmpty
@ -186,7 +186,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "No Procedures available for the selected order.".needTranslation,
noDataText: LocaleKeys.noProceduresAvailableForSelectedOrder.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -372,7 +372,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Procedures".needTranslation.toText12(
LocaleKeys.procedures.tr(context: context).toText12(
color: AppColors.textColorLight,
fontWeight: FontWeight.w600,
),
@ -385,7 +385,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
"Total Amount".needTranslation.toText12(
LocaleKeys.totalAmount.tr(context: context).toText12(
color: AppColors.textColorLight,
fontWeight: FontWeight.w600,
),
@ -535,7 +535,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
// ),
if (procedure.isCovered == true)
AppCustomChipWidget(
labelText: "Covered".needTranslation,
labelText: LocaleKeys.covered.tr(context: context),
backgroundColor: AppColors.successColor.withValues(alpha: 0.1),
textColor: AppColors.successColor,
),
@ -551,7 +551,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Price".needTranslation.toText10(color: AppColors.textColorLight),
LocaleKeys.price.tr(context: context).toText10(color: AppColors.textColorLight),
SizedBox(height: 4.h),
Row(
children: [
@ -570,7 +570,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"VAT (15%)".needTranslation.toText10(color: AppColors.textColorLight),
LocaleKeys.vatPercent.tr(context: context).toText10(color: AppColors.textColorLight),
SizedBox(height: 4.h),
Row(
children: [
@ -589,7 +589,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Total".needTranslation.toText10(color: AppColors.textColorLight),
LocaleKeys.total.tr(context: context).toText10(color: AppColors.textColorLight),
SizedBox(height: 4.h),
Row(
children: [
@ -654,7 +654,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
CustomButton(
borderWidth: 0,
backgroundColor: AppColors.infoLightColor,
text: "Proceed to Payment".needTranslation,
text: LocaleKeys.proceedToPayment.tr(context: context),
onPressed: () {
// Navigate to payment page with selected procedures
Navigator.of(context).push(

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
@ -9,6 +10,7 @@ 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/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart';
import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedures_details_page.dart';
import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -61,7 +63,7 @@ class _ToDoPageState extends State<ToDoPage> {
Widget build(BuildContext context) {
appState = getIt.get<AppState>();
return CollapsingListView(
title: "Ancillary Orders".needTranslation,
title: LocaleKeys.ancillaryOrdersList.tr(context: context),
isLeading: true,
child: SingleChildScrollView(
child: Column(

@ -79,7 +79,7 @@ class AncillaryOrdersList extends StatelessWidget {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any ancillary orders yet.".needTranslation,
noDataText: LocaleKeys.youDontHaveAnyAncillaryOrdersYet.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -187,31 +187,31 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.appointmentDate != null || isLoading)
AppCustomChipWidget(
icon: AppAssets.appointment_calendar_icon,
labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!).needTranslation,
labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!),
).toShimmer2(isShow: isLoading),
// Appointment Number
if (order.appointmentNo != null || isLoading)
AppCustomChipWidget(
labelText: isLoading ? "Appt# : 98765" : "Appt #: ${order.appointmentNo}".needTranslation,
labelText: isLoading ? "Appt# : 98765" : "Appt #: ${order.appointmentNo}",
).toShimmer2(isShow: isLoading),
// Invoice Number
if (order.invoiceNo != null || isLoading)
AppCustomChipWidget(
labelText: isLoading ? "Invoice: 45678" : "Invoice: ${order.invoiceNo}".needTranslation,
labelText: isLoading ? "Invoice: 45678" : LocaleKeys.invoiceWithNumber.tr(namedArgs: {'invoiceNo': '${order.invoiceNo}'}),
).toShimmer2(isShow: isLoading),
// Queued Status
if (order.isQueued == true || isLoading)
AppCustomChipWidget(
labelText: "Queued".needTranslation,
labelText: LocaleKeys.queued.tr(context: context),
).toShimmer2(isShow: isLoading),
// Check-in Available Status
if (order.isCheckInAllow == true || isLoading)
AppCustomChipWidget(
labelText: "Check-in Ready".needTranslation,
labelText: LocaleKeys.checkInReady.tr(context: context),
).toShimmer2(isShow: isLoading),
],
),
@ -225,7 +225,7 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.isCheckInAllow == true || isLoading)
Expanded(
child: CustomButton(
text: "Check In".needTranslation,
text: LocaleKeys.checkIn.tr(context: context),
onPressed: () {
if (isLoading) {
return;
@ -249,7 +249,7 @@ class AncillaryOrderCard extends StatelessWidget {
// View Details Button
Expanded(
child: CustomButton(
text: "View Details".needTranslation,
text: LocaleKeys.viewDetails.tr(context: context),
onPressed: () {
if (isLoading) {
return;

@ -7,6 +7,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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_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/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
@ -73,7 +74,7 @@ class AncillaryProceduresList extends StatelessWidget {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any ancillary orders yet.".needTranslation,
noDataText: LocaleKeys.youDontHaveAnyAncillaryOrdersYet.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -118,7 +119,7 @@ class AncillaryOrderCard extends StatelessWidget {
children: [
Row(
children: [
"Order #".needTranslation.toText14(
LocaleKeys.orderNumber.tr(context: context).toText14(
color: AppColors.textColorLight,
weight: FontWeight.w500,
),
@ -181,31 +182,31 @@ class AncillaryOrderCard extends StatelessWidget {
AppCustomChipWidget(
icon: AppAssets.calendar,
labelText:
isLoading ? "Date: Jan 20, 2024" : "Date: ${DateFormat('MMM dd, yyyy').format(order.appointmentDate!)}".needTranslation,
isLoading ? "Date: Jan 20, 2024" : "Date: ${DateFormat('MMM dd, yyyy').format(order.appointmentDate!)}",
).toShimmer2(isShow: isLoading),
// Appointment Number
if (order.appointmentNo != null || isLoading)
AppCustomChipWidget(
labelText: isLoading ? "Appt #: 98765" : "Appt #: ${order.appointmentNo}".needTranslation,
labelText: isLoading ? "Appt #: 98765" : "Appt #: ${order.appointmentNo}",
).toShimmer2(isShow: isLoading),
// Invoice Number
if (order.invoiceNo != null || isLoading)
AppCustomChipWidget(
labelText: isLoading ? "Invoice: 45678" : "Invoice: ${order.invoiceNo}".needTranslation,
labelText: isLoading ? "Invoice: 45678" : LocaleKeys.invoiceWithNumber.tr(namedArgs: {'invoiceNo': '${order.invoiceNo}'}),
).toShimmer2(isShow: isLoading),
// Queued Status
if (order.isQueued == true || isLoading)
AppCustomChipWidget(
labelText: "Queued".needTranslation,
labelText: LocaleKeys.queued.tr(context: context),
).toShimmer2(isShow: isLoading),
// Check-in Available Status
if (order.isCheckInAllow == true || isLoading)
AppCustomChipWidget(
labelText: "Check-in Ready".needTranslation,
labelText: LocaleKeys.checkInReady.tr(context: context),
).toShimmer2(isShow: isLoading),
],
),
@ -219,7 +220,7 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.isCheckInAllow == true || isLoading)
Expanded(
child: CustomButton(
text: "Check In".needTranslation,
text: LocaleKeys.checkIn.tr(context: context),
onPressed: () {
if (isLoading) {
return;
@ -243,7 +244,7 @@ class AncillaryOrderCard extends StatelessWidget {
// View Details Button
Expanded(
child: CustomButton(
text: "View Details".needTranslation,
text: LocaleKeys.viewDetails.tr(context: context),
onPressed: () {
if (isLoading) {
return;

@ -1,5 +1,6 @@
import 'dart:io' show Platform;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/core/utils/calender_utils_new.dart';
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/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart';
import 'package:hmg_patient_app_new/services/permission_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -40,13 +42,13 @@ class BottomSheetUtils{
Future<void> _showReminderBottomSheet(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async {
showCommonBottomSheetWithoutHeight(providedContext, title: "Set the timer of reminder".needTranslation, child: PrescriptionReminderView(
showCommonBottomSheetWithoutHeight(providedContext, title: LocaleKeys.setTimerOfReminder.tr(), child: PrescriptionReminderView(
setReminder: (int value) async {
if (!isMultiAllowed!) {
if (onMultiDateSuccess == null) {
CalenderUtilsNew calendarUtils = CalenderUtilsNew.instance;
await calendarUtils.createOrUpdateEvent(
title: title ?? "You have appointment with Dr. ".needTranslation + doctorName,
title: title ?? LocaleKeys.youHaveAppointmentWithDr.tr() + doctorName,
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
scheduleDateTime: dateTime,
eventId: eventId,

@ -1,6 +1,8 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/generated/locale_keys.g.dart';
Widget buildTime(Duration duration, {bool isHomePage = false}) {
String twoDigits(int n) => n.toString().padLeft(2, '0');
@ -11,9 +13,9 @@ Widget buildTime(Duration duration, {bool isHomePage = false}) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
buildTimeColumn(hours, "Hours".needTranslation),
buildTimeColumn(minutes, "Mins".needTranslation),
buildTimeColumn(seconds, "Secs".needTranslation, isLast: true),
buildTimeColumn(hours, LocaleKeys.hours.tr()),
buildTimeColumn(minutes, LocaleKeys.mins.tr()),
buildTimeColumn(seconds, LocaleKeys.secs.tr(), isLast: true),
],
);
}

Loading…
Cancel
Save