pull/212/head
haroon amjad 1 day ago
parent 56f5151c0c
commit 89a1da4407

@ -1673,5 +1673,11 @@
"doctorRatingAppointment": "طبيب\nتصنيف", "doctorRatingAppointment": "طبيب\nتصنيف",
"ratingSubmitted": "تم إرسال التقييم", "ratingSubmitted": "تم إرسال التقييم",
"rateTheDoctor": "يرجى تقييم الطبيب", "rateTheDoctor": "يرجى تقييم الطبيب",
"downloadInvoice": "تحميل الفاتورة" "downloadInvoice": "تحميل الفاتورة",
"approvalDetails": "تفاصيل الموافقة",
"obese": "سمين",
"overWeight": "وزن زائد",
"underWeight": "وزن ناقص",
"nearestGate": "أقرب بوابة",
"RRTDDetails": "فريق الاستجابة السريعة يقوم بتقديم رعاية صحية متكاملة لجميع الحالات الطارئة و المستقرة، الخدمة تشمل جميع الأعمار بما في ذلك حالات الأطفال."
} }

@ -1665,5 +1665,11 @@
"doctorRatingAppointment": "Doctor\nRating", "doctorRatingAppointment": "Doctor\nRating",
"ratingSubmitted": "Rating Submitted", "ratingSubmitted": "Rating Submitted",
"rateTheDoctor": "Please rate the doctor", "rateTheDoctor": "Please rate the doctor",
"downloadInvoice": "Download Invoice" "downloadInvoice": "Download Invoice",
"approvalDetails": "Approval Details",
"obese": "Obese",
"overWeight": "OverWeight",
"underWeight": "UnderWeight",
"nearestGate": "Nearest Gate",
"RRTDDetails": "The Rapid response team provides a comprehensive medical service for all sorts of urgent and stable cases of all ages, including adult and paediatric patients."
} }

@ -371,7 +371,7 @@ class Utils {
Lottie.asset(AppAnimations.loadingAnimation, Lottie.asset(AppAnimations.loadingAnimation,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill), repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isCenter: true), (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isCenter: true, isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
], ],
).center; ).center;
@ -384,7 +384,7 @@ class Utils {
children: [ children: [
Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor).paddingSymmetrical(24.h, 0.h), (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 8.h), SizedBox(height: 8.h),
], ],
).center; ).center;

@ -193,7 +193,7 @@ class DoctorsListResponseModel {
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
setupID = json['SetupID']; setupID = json['SetupID'];
speciality = json['Speciality'] != null ? json['Speciality'].cast<String>() : []; speciality = json['Speciality'] != null ? json['Speciality'].cast<String>() : [];
// specialityN = json['SpecialityN'].cast<String>(); specialityN = json['SpecialityN'] != null ? json['SpecialityN'].cast<String>() : [];
transactionType = json['TransactionType']; transactionType = json['TransactionType'];
virtualEmploymentType = json['VirtualEmploymentType']; virtualEmploymentType = json['VirtualEmploymentType'];
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.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';
/// UI-only helper model for Vital Sign cards. /// UI-only helper model for Vital Sign cards.
@ -49,7 +51,7 @@ class VitalSignUiModel {
} }
// Warning for both low and overweight/underweight BMI, since they can indicate potential health issues. // Warning for both low and overweight/underweight BMI, since they can indicate potential health issues.
if (s.contains('low') || s.contains('underweight') || s.contains('overweight')) { if (s.contains('low') || s.contains(LocaleKeys.underWeight.tr()) || s.contains(LocaleKeys.overWeight.tr())) {
final Color yellowBg = AppColors.highAndLow.withValues(alpha: 0.12); final Color yellowBg = AppColors.highAndLow.withValues(alpha: 0.12);
return VitalSignUiModel( return VitalSignUiModel(
iconBg: yellowBg, iconBg: yellowBg,
@ -96,13 +98,13 @@ class VitalSignUiModel {
final double bmiResult = double.tryParse(bmi.toString()) ?? 0; final double bmiResult = double.tryParse(bmi.toString()) ?? 0;
if (bmiResult >= 30) { if (bmiResult >= 30) {
bmiStatus = "High"; bmiStatus = LocaleKeys.obese.tr();
} else if (bmiResult < 30 && bmiResult >= 25) { } else if (bmiResult < 30 && bmiResult >= 25) {
bmiStatus = "Overweight"; bmiStatus = LocaleKeys.overWeight.tr();
} else if (bmiResult < 25 && bmiResult >= 18.5) { } else if (bmiResult < 25 && bmiResult >= 18.5) {
bmiStatus = "Normal"; bmiStatus = LocaleKeys.normal.tr();
} else if (bmiResult < 18.5) { } else if (bmiResult < 18.5) {
bmiStatus = "Underweight"; bmiStatus = LocaleKeys.underWeight.tr();
} }
// if (bmi == null) return 'N/A'; // if (bmi == null) return 'N/A';

@ -54,6 +54,7 @@ abstract class SymptomsCheckerRepo {
Future<Either<Failure, GenericApiModel<List<GetClinicDetailsResponseModel>>>> getClinicDetails({ Future<Either<Failure, GenericApiModel<List<GetClinicDetailsResponseModel>>>> getClinicDetails({
required String categoryName, required String categoryName,
required String language,
required String userSessionToken, required String userSessionToken,
}); });
} }
@ -400,6 +401,7 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
@override @override
Future<Either<Failure, GenericApiModel<List<GetClinicDetailsResponseModel>>>> getClinicDetails({ Future<Either<Failure, GenericApiModel<List<GetClinicDetailsResponseModel>>>> getClinicDetails({
required String categoryName, required String categoryName,
required String language,
required String userSessionToken, required String userSessionToken,
}) async { }) async {
Map<String, String> headers = { Map<String, String> headers = {
@ -413,7 +415,7 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
Failure? failure; Failure? failure;
await apiClient.get( await apiClient.get(
"${ApiConsts.getClinicFromCondition}$categoryName", "${ApiConsts.getClinicFromCondition}$categoryName&language=$language",
apiHeaders: headers, apiHeaders: headers,
isExternal: true, isExternal: true,
isAllowAny: true, isAllowAny: true,

@ -1079,6 +1079,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
final result = await symptomsCheckerRepo.getClinicDetails( final result = await symptomsCheckerRepo.getClinicDetails(
categoryName: categoryName, categoryName: categoryName,
language: appState.isArabic() ? 'ar' : 'en',
userSessionToken: currentSessionAuthToken, userSessionToken: currentSessionAuthToken,
); );

@ -1666,5 +1666,11 @@ abstract class LocaleKeys {
static const ratingSubmitted = 'ratingSubmitted'; static const ratingSubmitted = 'ratingSubmitted';
static const rateTheDoctor = 'rateTheDoctor'; static const rateTheDoctor = 'rateTheDoctor';
static const downloadInvoice = 'downloadInvoice'; static const downloadInvoice = 'downloadInvoice';
static const approvalDetails = 'approvalDetails';
static const obese = 'obese';
static const overWeight = 'overWeight';
static const underWeight = 'underWeight';
static const nearestGate = 'nearestGate';
static const RRTDDetails = 'RRTDDetails';
} }

@ -359,12 +359,12 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
AppCustomChipWidget( AppCustomChipWidget(
labelText: bookAppointmentsVM.isAppointmentNearestGateLoading labelText: bookAppointmentsVM.isAppointmentNearestGateLoading
? "Floor: Ground Floor" ? "Floor: Ground Floor"
: "Floor: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}", : "${LocaleKeys.floor.tr(context: context)}: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading), ).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}") "${LocaleKeys.nearestGate.tr(context: context)}: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading), .toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
], ],
) : SizedBox.shrink(), ) : SizedBox.shrink(),
], ],

@ -111,7 +111,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Image.asset(AppAssets.mada, width: 72.h, height: 25.h) Image.asset(AppAssets.mada, width: 72.h, height: 25.h)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Mada".toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), LocaleKeys.mada.tr(context: context).toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -153,7 +153,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
], ],
).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), ).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Visa or Mastercard" LocaleKeys.visaOrMastercard.tr(context: context)
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
], ],
@ -193,7 +193,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h) Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Tamara" LocaleKeys.tamara.tr(context: context)
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
], ],

@ -161,7 +161,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
spacing: 4.h, spacing: 4.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old"), AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
AppCustomChipWidget(labelText: "${LocaleKeys.gender.tr(context: context)}: ${appState.getAuthenticatedUser()?.gender == 1 ? LocaleKeys.malE.tr(context: context) : LocaleKeys.femaleGender.tr(context: context)}"), AppCustomChipWidget(labelText: "${LocaleKeys.gender.tr(context: context)}: ${appState.getAuthenticatedUser()?.gender == 1 ? LocaleKeys.malE.tr(context: context) : LocaleKeys.femaleGender.tr(context: context)}"),
], ],
), ),
@ -197,12 +197,12 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
AppCustomChipWidget( AppCustomChipWidget(
labelText: bookAppointmentsVM.isAppointmentNearestGateLoading labelText: bookAppointmentsVM.isAppointmentNearestGateLoading
? "Floor: Ground Floor" ? "Floor: Ground Floor"
: "Floor: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}", : "${LocaleKeys.floor.tr(context: context)} ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading), ).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}") "${LocaleKeys.nearestGate.tr(context: context)} ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading), .toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
], ],
) )
: SizedBox.shrink(), : SizedBox.shrink(),

@ -220,7 +220,7 @@ class _EmergencyServicesPageState extends State<EmergencyServicesPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.blackColor), LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
"Comprehensive medical service for all sorts of urgent and stable cases".toText12(color: AppColors.greyTextColor, isBold: true), LocaleKeys.RRTDDetails.tr(context: context).toText12(color: AppColors.greyTextColor, isBold: true),
], ],
), ),
), ),

@ -145,7 +145,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
child: insuranceApprovalResponseModel.apporvalDetails != null ? Column( child: insuranceApprovalResponseModel.apporvalDetails != null ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Approval Details".toText16(isBold: true), LocaleKeys.approvalDetails.toText16(isBold: true),
ListView.separated( ListView.separated(
padding: EdgeInsets.only(top: 16.h), padding: EdgeInsets.only(top: 16.h),
shrinkWrap: true, shrinkWrap: true,

@ -94,7 +94,7 @@ class _SearchLabResultsContentState extends State<SearchLabResultsContent> {
), ),
SizedBox(height: ResponsiveExtension(20).h), SizedBox(height: ResponsiveExtension(20).h),
if (filteredSuggestions.isNotEmpty) ...[ if (filteredSuggestions.isNotEmpty) ...[
"Suggestions".toText16(isBold: true, isEnglishOnly: true), LocaleKeys.suggestions.tr(context: context).toText16(isBold: true, isEnglishOnly: true),
], ],
], ],
), ),

@ -25,7 +25,7 @@ class EyeMeasurementsAppointmentsPage extends StatelessWidget {
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: "Eye Measurements", title: LocaleKeys.eyeMeasurements.tr(context: context),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) { child: Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return Column( return Column(

@ -345,7 +345,7 @@ class _FamilyCardsState extends State<FamilyCards> {
CustomChipWidget( CustomChipWidget(
chipType: ChipTypeEnum.alert, chipType: ChipTypeEnum.alert,
backgroundColor: AppColors.lightGrayBGColor, backgroundColor: AppColors.lightGrayBGColor,
chipText: "Relation: ${profile.relationship ?? " N/A"}", chipText: "${LocaleKeys.relationship.tr(context: context)}: ${profile.relationship ?? " N/A"}",
iconAsset: AppAssets.heart, iconAsset: AppAssets.heart,
isShowBorder: false, isShowBorder: false,
borderRadius: 8.h, borderRadius: 8.h,
@ -355,7 +355,7 @@ class _FamilyCardsState extends State<FamilyCards> {
? CustomChipWidget( ? CustomChipWidget(
chipType: ChipTypeEnum.alert, chipType: ChipTypeEnum.alert,
backgroundColor: AppColors.lightGrayBGColor, backgroundColor: AppColors.lightGrayBGColor,
chipText: "Age: ${profile.age ?? "N/A"} Years", chipText: "${LocaleKeys.age.tr(context: context)}: ${profile.age ?? "N/A"} ${LocaleKeys.years.tr(context: context)}",
isShowBorder: false, isShowBorder: false,
borderRadius: 8.h, borderRadius: 8.h,
textColor: AppColors.textColor, textColor: AppColors.textColor,

@ -54,7 +54,7 @@ class FamilyCardWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
"${profile.patientName}".toText18(isBold: true, isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1), "${profile.patientName}".toText18(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.file_icon, icon: AppAssets.file_icon,
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.responseId}", labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.responseId}",

@ -388,8 +388,8 @@ class _ScrollAnimatedTitleState extends State<ScrollAnimatedTitle> {
letterSpacing: -0.4, letterSpacing: -0.4,
fontSize: (12 - (2 * (1 - t))).f, fontSize: (12 - (2 * (1 - t))).f,
fontWeight: FontWeight.lerp( fontWeight: FontWeight.lerp(
FontWeight.w400, FontWeight.w500,
FontWeight.w600, FontWeight.w700,
t, t,
)!, )!,
), ),

Loading…
Cancel
Save