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

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

@ -1665,5 +1665,11 @@
"doctorRatingAppointment": "Doctor\nRating",
"ratingSubmitted": "Rating Submitted",
"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,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill),
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),
],
).center;
@ -384,7 +384,7 @@ class Utils {
children: [
Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
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),
],
).center;

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

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.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';
/// 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.
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);
return VitalSignUiModel(
iconBg: yellowBg,
@ -96,13 +98,13 @@ class VitalSignUiModel {
final double bmiResult = double.tryParse(bmi.toString()) ?? 0;
if (bmiResult >= 30) {
bmiStatus = "High";
bmiStatus = LocaleKeys.obese.tr();
} else if (bmiResult < 30 && bmiResult >= 25) {
bmiStatus = "Overweight";
bmiStatus = LocaleKeys.overWeight.tr();
} else if (bmiResult < 25 && bmiResult >= 18.5) {
bmiStatus = "Normal";
bmiStatus = LocaleKeys.normal.tr();
} else if (bmiResult < 18.5) {
bmiStatus = "Underweight";
bmiStatus = LocaleKeys.underWeight.tr();
}
// if (bmi == null) return 'N/A';

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

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

@ -1666,5 +1666,11 @@ abstract class LocaleKeys {
static const ratingSubmitted = 'ratingSubmitted';
static const rateTheDoctor = 'rateTheDoctor';
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(
labelText: bookAppointmentsVM.isAppointmentNearestGateLoading
? "Floor: Ground Floor"
: "Floor: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
: "${LocaleKeys.floor.tr(context: context)}: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
AppCustomChipWidget(
labelText:
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
"${LocaleKeys.nearestGate.tr(context: context)}: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
],
) : SizedBox.shrink(),
],

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

@ -161,7 +161,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
spacing: 4.h,
runSpacing: 4.h,
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)}"),
],
),
@ -197,12 +197,12 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
AppCustomChipWidget(
labelText: bookAppointmentsVM.isAppointmentNearestGateLoading
? "Floor: Ground Floor"
: "Floor: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
: "${LocaleKeys.floor.tr(context: context)} ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
AppCustomChipWidget(
labelText:
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
"${LocaleKeys.nearestGate.tr(context: context)} ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
],
)
: SizedBox.shrink(),

@ -220,7 +220,7 @@ class _EmergencyServicesPageState extends State<EmergencyServicesPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
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(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Approval Details".toText16(isBold: true),
LocaleKeys.approvalDetails.toText16(isBold: true),
ListView.separated(
padding: EdgeInsets.only(top: 16.h),
shrinkWrap: true,

@ -94,7 +94,7 @@ class _SearchLabResultsContentState extends State<SearchLabResultsContent> {
),
SizedBox(height: ResponsiveExtension(20).h),
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(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Eye Measurements",
title: LocaleKeys.eyeMeasurements.tr(context: context),
child: SingleChildScrollView(
child: Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return Column(

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

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

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

Loading…
Cancel
Save