* 'master' of http://34.17.182.140/Haroon6138/HMG_Patient_App_New:
  Hotfix app update sent to stores, VersionID 21.1, Lakum points implementation contd.
  updates
  Er refferal Fix
  last login issue resolved
  Updates
  updates
  updates & fixes

# Conflicts:
#	assets/langs/ar-SA.json
#	assets/langs/en-US.json
#	lib/generated/locale_keys.g.dart
#	lib/presentation/e_referral/new_e_referral.dart
#	lib/presentation/e_referral/widget/e_referral_other_details.dart
dev_sultan
Sultan khan 19 hours ago
commit b6e3c4a5ce

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

@ -286,7 +286,7 @@
"gate": "البوابة:",
"building": "المبنى:",
"branch": "الفرع:",
"emergencyServices": "خدمات الطوارئ",
"emergencyServices": "خدمات \n الطوارئ",
"nearester": "أقرب طوارئ",
"locationa": "الموقع",
"callNow": "الاتصال المباشر",
@ -1236,9 +1236,9 @@
"monitorBloodPressureLevels": "راقب مستويات ضغط الدم لديك، وتتبع القراءات الانقباضية والانبساطية، وحافظ على صحة قلبك.",
"trackWeightProgress": "تتبع تقدم وزنك، وضع الأهداف، وحافظ على كتلة جسم صحية من أجل العافية الشاملة.",
"bookAppointment": "حجز\nموعد",
"completeCheckup": "الفحص الشامل",
"completeCheckup": "الفحص \n الشامل",
"indoorNavigation": "الملاحة الداخلية",
"eReferralServices": "الإحالة الإلكترونية",
"eReferralServices": "الإحالة \n الإلكترونية",
"bloodDonation": "التبرع بالدم",
"dailyWaterMonitor": "مراقب الماء اليومي",
"fetchingYourWaterIntakeDetails": "يرجى الانتظار…",
@ -1845,5 +1845,5 @@
"maxOneFileAllowed": "يمكن رفع ملف واحد فقط",
"fileSizeExceedsLimit": "يجب ألا يتجاوز حجم الملف 1 ميغابايت",
"completedPrescriptionOrder": "تمت الخدمة",
"submitReferral": "تقديم الطلب"
"submitEReferral": "تقديم الطلب"
}

@ -1801,7 +1801,7 @@
"watchUsOnYoutube": "Watch us on youtube",
"connectOnLinkedin": "Connect on LinkedIn",
"riskFactorPageTitle": "What do you feel?",
"bloodDonationService": "Blood Donation",
"bloodDonationService": "Blood \nDonation",
"bookAppointmentService": "Book\nAppointment",
"pinchToZoom": "Pinch to zoom",
"gotIt": "Got it",
@ -1835,7 +1835,7 @@
"maxOneFileAllowed": "Only 1 file can be uploaded",
"fileSizeExceedsLimit": "File size must not exceed 1 MB",
"completedPrescriptionOrder": "Completed",
"submitReferral": "Submit"
"submitEReferral": "Submit"
}

@ -4,7 +4,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts {
static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT
@ -58,8 +58,6 @@ class ApiConsts {
symptomsCheckerApi = symptomsCheckerApiLive;
symptomsCheckerUsername = 'mobile_user';
symptomsCheckerPassword = '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92';
CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId=";
break;
case AppEnvironmentTypeEnum.dev:
baseUrl = "https://uat.hmgwebservices.com/";
@ -283,7 +281,7 @@ class ApiConsts {
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api ****************
static final double appVersionID = 21.0;
static final double appVersionID = 21.1;
// static final double appVersionID = 50.7;
static final int appChannelId = 3;

@ -417,6 +417,7 @@ class AppAssets {
static const String comprehensiveCheckupAr = '$pngBasePath/cc_ar.png';
static const String maleIcon = '$pngBasePath/male_icon.png';
static const String femaleIcon = '$pngBasePath/female_icon.png';
static const String lakumLogo = '$pngBasePath/lakum_logo.png';
static const String fullBodyFrontMale = '$pngBasePath/full_body_front_male.png';
static const String fullBodyBackMale = '$pngBasePath/full_body_back_male.png';

@ -442,7 +442,7 @@ class PushNotificationHandler {
badge: true,
sound: true,
);
if (permission.authorizationStatus == AuthorizationStatus.denied) return;
// if (permission.authorizationStatus == AuthorizationStatus.denied) return;
} else {
final permission = await FirebaseMessaging.instance.requestPermission();
}
@ -494,7 +494,7 @@ class PushNotificationHandler {
log("Push Notification getToken: ${token!}");
onToken(token!);
}).catchError((err) {
log(err);
log(err.toString());
});
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {

@ -284,10 +284,14 @@ class AuthenticationViewModel extends ChangeNotifier {
// Validate based on selected country
if (selectedCountrySignup == CountryEnum.saudiArabia) {
if (!ValidationUtils.validateIqama(nationalIdController.text)) {
_nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr();
notifyListeners();
return false;
if (cleanedId.length == 10) {
if (!ValidationUtils.validateIqama(nationalIdController.text)) {
_nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr();
notifyListeners();
return false;
}
} else {
return true;
}
} else if (selectedCountrySignup == CountryEnum.unitedArabEmirates) {
if (!ValidationUtils.validateUaeNationalId(nationalIdController.text)) {

@ -1106,7 +1106,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
docID: selectedDoctor.doctorID!,
clinicID: selectedDoctor.clinicID!,
projectID: selectedDoctor.projectID!,
serviceID: selectedLiveCareClinic.serviceID!,
serviceID: selectedLiveCareClinic.serviceID ?? 0,
selectedDate: selectedAppointmentDate,
selectedTime: selectedAppointmentTime,
initialSlotDuration: initialSlotDuration,

@ -290,9 +290,9 @@ class ContactUsViewModel extends ChangeNotifier {
requestInsertCOCItem.isUserLoggedIn = true;
requestInsertCOCItem.projectID = 0;
requestInsertCOCItem.patientName = "${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}";
requestInsertCOCItem.fileName = "";
requestInsertCOCItem.fileName = "Image 1";
requestInsertCOCItem.appVersion = ApiConsts.appVersionID;
requestInsertCOCItem.uILanguage = appState.isArabic() ? "ar" : "en"; //TODO Change it to be dynamic
requestInsertCOCItem.uILanguage = appState.isArabic() ? "ar" : "en";
requestInsertCOCItem.browserInfo = Platform.localHostname;
requestInsertCOCItem.deviceInfo = Platform.localHostname;
requestInsertCOCItem.resolution = "400x847";

@ -42,6 +42,8 @@ class HabibWalletViewModel extends ChangeNotifier {
String? get amountError => _amountError;
String? get hospitalError => _hospitalError;
String yahalaAccountNumber = '';
// Clear amount error
void clearAmountError() {
_amountError = null;

@ -959,9 +959,9 @@ class HmgServicesRepoImp implements HmgServicesRepo {
final hasValidRespiration = _isValidValue(vitalSign.respirationBeatPerMinute);
final hasValidBloodPressure = _isValidValue(vitalSign.bloodPressureHigher) || _isValidValue(vitalSign.bloodPressureLower);
print('hasValidBloodPressure: $hasValidBloodPressure');
print('Will add to list: ${hasValidWeight || hasValidHeight || hasValidBMI || hasValidTemperature || hasValidHeartRate || hasValidRespiration || hasValidBloodPressure}');
print('=====================================');
// print('hasValidBloodPressure: $hasValidBloodPressure');
// print('Will add to list: ${hasValidWeight || hasValidHeight || hasValidBMI || hasValidTemperature || hasValidHeartRate || hasValidRespiration || hasValidBloodPressure}');
// print('=====================================');
// Add if ANY vital sign has valid data
if (hasValidWeight || hasValidHeight || hasValidBMI || hasValidTemperature ||

@ -1837,6 +1837,6 @@ abstract class LocaleKeys {
static const maxOneFileAllowed = 'maxOneFileAllowed';
static const fileSizeExceedsLimit = 'fileSizeExceedsLimit';
static const completedPrescriptionOrder = 'completedPrescriptionOrder';
static const submitReferral = 'submitReferral';
static const submitEReferral = 'submitEReferral';
}

@ -96,7 +96,13 @@ Future<void> callAppStateInitializations() async {
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) {
if (!kDebugMode) FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
if (!kDebugMode) {
FirebaseCrashlytics.instance.recordError(error, stack,
fatal: true,
printDetails: true,
reason:
"${appState.isAuthenticated ? "Authenticated User ID: ${appState.getAuthenticatedUser()!.patientId} - ${appState.getAuthenticatedUser()!.mobileNumber}" : "Unauthenticated User"} - Uncaught asynchronous error");
}
return true;
};
}

@ -219,14 +219,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
richText: Row(
children: [
"${group.length} ".toText10(isEnglishOnly: true),
"${LocaleKeys.doctors2.tr(context: context)} ".toText10()
],
),
// labelText: "${group.length} ${'doctors'}",
isEnglishOnly: true,
labelText: "${group.length} ${LocaleKeys.doctors.tr(context: context)}",
),
Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
],
@ -360,8 +353,8 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
),
);
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 0.h),
),
SizedBox(height: 60.h),
],
);

@ -78,7 +78,7 @@ class _DoctorResponsePageState extends State<DoctorResponsePage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
askDoctorVM.doctorResponsesList[index].requestTypeDescription!.toText18(isBold: true),
(askDoctorVM.doctorResponsesList[index].requestTypeDescription ?? "").toText18(isBold: true),
SizedBox(height: 24.h),
Row(
crossAxisAlignment: CrossAxisAlignment.start,

@ -150,7 +150,7 @@ class _SavedLogin extends State<SavedLogin> {
fontSize: 12.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
height: 40.h,
height: 44.h,
padding: EdgeInsets.symmetric(vertical: 10.h),
icon: (isOther == true && loginType == LoginTypeEnum.sms) ? AppAssets.whatsapp : getTypeIcons(loginType.toInt),
iconColor:

@ -356,7 +356,7 @@ class FeedbackPage extends StatelessWidget {
(String image, file) {
print(image);
print(file);
Navigator.pop(context);
// Navigator.pop(context);
contactUsViewModel.addFeedbackAttachment(image);
},
);

@ -185,7 +185,7 @@ class _NewReferralPageState extends State<NewReferralPage> {
color: AppColors.whiteColor,
padding: EdgeInsets.all(ResponsiveExtension(20).h),
child: CustomButton(
text: _currentStep <= 1 ? LocaleKeys.next.tr() : LocaleKeys.submitReferral.tr(),
text: _currentStep <= 1 ? LocaleKeys.next.tr() : LocaleKeys.submitEReferral.tr(),
// icon: AppAssets.search_icon,
iconColor: Colors.white,
onPressed: () => {_handleNextStep()},

@ -89,87 +89,75 @@ class PatientInformationStepState extends State<PatientInformationStep> {
}
Widget _buildSectionTitle(String title) {
return Text(
title,
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 16)
).paddingSymmetrical(4, 0);
return Text(title, style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 16)).paddingSymmetrical(4, 0);
}
Widget _buildIdentificationField(ReferralFormManager formManager) {
return Focus(
return TextInputWidget(
controller: _identificationController,
focusNode: _identificationFocusNode,
child: TextInputWidget(
controller: _identificationController,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(12).h,
horizontal: ResponsiveExtension(16).h,
),
hintText: LocaleKeys.enterIdentificationNumber.tr(context: context),
labelText: LocaleKeys.identificationNumber.tr(context: context),
errorMessage: formManager.errors.patientIdentification,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientIdentification),
onChange: (value) {
formManager.updatePatientIdentification(value ?? '');
},
onSubmitted: (value) {
_nameFocusNode.requestFocus();
},
).paddingSymmetrical(0, 4),
);
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(12).h,
horizontal: ResponsiveExtension(16).h,
),
hintText: LocaleKeys.enterIdentificationNumber.tr(context: context),
labelText: LocaleKeys.identificationNumber.tr(context: context),
errorMessage: formManager.errors.patientIdentification,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientIdentification),
onChange: (value) {
formManager.updatePatientIdentification(value ?? '');
},
onSubmitted: (value) {
_nameFocusNode.requestFocus();
},
).paddingSymmetrical(0, 4);
}
Widget _buildPatientNameField(ReferralFormManager formManager) {
return Focus(
return TextInputWidget(
controller: _nameController,
focusNode: _nameFocusNode,
child: TextInputWidget(
controller: _nameController,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(12).h,
horizontal: ResponsiveExtension(16).h,
),
hintText: LocaleKeys.patientName.tr(context: context),
labelText: LocaleKeys.name.tr(context: context),
keyboardType: TextInputType.text,
errorMessage: formManager.errors.patientName,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientName),
onChange: (value) {
formManager.updatePatientName(value ?? '');
},
onSubmitted: (value) {
// Optionally move to next field or keep focus
},
).paddingSymmetrical(0, 4),
);
padding: EdgeInsets.symmetric(vertical: ResponsiveExtension(12).h, horizontal: ResponsiveExtension(16).h),
hintText: LocaleKeys.patientName.tr(context: context),
labelText: LocaleKeys.name.tr(context: context),
keyboardType: TextInputType.text,
errorMessage: formManager.errors.patientName,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientName),
onChange: (value) {
formManager.updatePatientName(value ?? '');
},
onSubmitted: (value) {
_phoneFocusNode.requestFocus();
},
).paddingSymmetrical(0, 4);
}
Widget _buildPatientPhoneField(ReferralFormManager formManager) {
return Directionality(
textDirection: ui.TextDirection.ltr,
child: Focus(
child: TextInputWidget(
labelText: LocaleKeys.phoneNumber.tr(context: context),
hintText: "5xxxxxxxx",
controller: _phoneController,
focusNode: _phoneFocusNode,
child: TextInputWidget(
labelText: LocaleKeys.phoneNumber.tr(context: context),
hintText: "5xxxxxxxx",
controller: _phoneController,
padding: const EdgeInsets.all(8),
keyboardType: TextInputType.number,
fontFamily: "Poppins",
onChange: (value) {
formManager.updatePatientPhone(value ?? '');
},
onCountryChange: (value) {
formManager.updatePatientCountryEnum(value);
},
prefix: '966',
isBorderAllowed: false,
isAllowLeadingIcon: true,
fontSize: 13,
isCountryDropDown: true,
leadingIcon: AppAssets.smart_phone,
errorMessage: formManager.errors.patientPhone,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientPhone)
).paddingSymmetrical(0, 8),
),
padding: const EdgeInsets.all(8),
keyboardType: TextInputType.number,
fontFamily: "Poppins",
onChange: (value) {
formManager.updatePatientPhone(value ?? '');
},
onCountryChange: (value) {
formManager.updatePatientCountryEnum(value);
},
prefix: '966',
isBorderAllowed: false,
isAllowLeadingIcon: true,
fontSize: 13,
isCountryDropDown: true,
leadingIcon: AppAssets.smart_phone,
errorMessage: formManager.errors.patientPhone,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientPhone),
).paddingSymmetrical(0, 8),
);
}
@ -185,19 +173,17 @@ class PatientInformationStepState extends State<PatientInformationStep> {
leadingIcon: AppAssets.globe,
dropdownItems: [],
errorMessage: formManager.errors.patientCity,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientCity),
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientCity),
).paddingSymmetrical(0, 4).onPress(() {
_showCityBottomSheet(context, formManager);
});
}
String? getLocaleDescription(GetAllCitiesResponseModel? patientCity){
return getIt.get<AppState>().isArabic() ? patientCity?.descriptionN: patientCity?.description;
String? getLocaleDescription(GetAllCitiesResponseModel? patientCity) {
return getIt.get<AppState>().isArabic() ? patientCity?.descriptionN : patientCity?.description;
}
void _showCityBottomSheet(BuildContext context, ReferralFormManager formManager) {
showCommonBottomSheetWithoutHeight(
context,
title: LocaleKeys.selectCity.tr(context: context),
@ -216,25 +202,25 @@ class PatientInformationStepState extends State<PatientInformationStep> {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
customBorder: BorderRadius.all(Radius.circular(24.h)) ,
), child: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.all(16.h),
physics: const BouncingScrollPhysics(),
itemBuilder: (context, index) {
final city = cities[index];
return ListTile(
title: (getLocaleDescription(city) ?? 'Unknown').toText14(),
onTap: () {
formManager.updatePatientCity(city);
Navigator.pop(context);
customBorder: BorderRadius.all(Radius.circular(24.h)),
),
child: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.all(16.h),
physics: const BouncingScrollPhysics(),
itemBuilder: (context, index) {
final city = cities[index];
return ListTile(
title: (getLocaleDescription(city) ?? 'Unknown').toText14(),
onTap: () {
formManager.updatePatientCity(city);
Navigator.pop(context);
},
);
},
);
},
// separatorBuilder: (context, index) => const Divider(),
itemCount: cities.length,
));
// separatorBuilder: (context, index) => const Divider(),
itemCount: cities.length,
));
},
),
useSafeArea: true,
@ -253,4 +239,4 @@ class PatientInformationStepState extends State<PatientInformationStep> {
_phoneFocusNode.dispose();
super.dispose();
}
}
}

@ -41,6 +41,7 @@ import 'package:hmg_patient_app_new/presentation/contact_us/contact_us.dart';
import 'package:hmg_patient_app_new/presentation/hmg_services/services_page.dart';
import 'package:hmg_patient_app_new/presentation/home/data/landing_page_data.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/habib_wallet_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/lakum_wallet_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dart';
@ -451,12 +452,12 @@ class _LandingPageState extends State<LandingPage> {
height: isTablet ? 290.h : 255.h,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemCount: 3,
itemCount: myAppointmentsVM.patientAppointmentsHistoryList.length < 3 ? myAppointmentsVM.patientAppointmentsHistoryList.length : 3,
shrinkWrap: true,
padding: EdgeInsets.only(left: 16.h, right: 16.h),
itemBuilder: (context, index) {
return SizedBox(
height: isTablet ? 290.h : 255.h,
height: isTablet ? 290.h : 255.h,
width: 250.w,
child: getIndexSwiperCard(index),
);
@ -833,7 +834,26 @@ class _LandingPageState extends State<LandingPage> {
separatorBuilder: (BuildContext cxt, int index) => SizedBox(width: 16.w),
),
),
appState.isAuthenticated ? HabibWalletCard() : SizedBox(),
appState.isAuthenticated
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(
height: 170.h,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemCount: 2,
padding: EdgeInsetsDirectional.only(start: 24.h, end: 24.h),
itemBuilder: (BuildContext context, int index) {
return index == 0 ? HabibWalletCard() : LakumWalletCard();
},
separatorBuilder: (BuildContext context, int index) => SizedBox(width: 12.h),
),
),
],
)
: SizedBox(),
],
),
),
@ -980,9 +1000,14 @@ class _LandingPageState extends State<LandingPage> {
// );
// }
return _buildAppointmentCardWrapper(
myAppointmentsViewModel.patientAppointmentsHistoryList[1],
);
// Safety check: ensure list has at least 2 items
if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 1) {
return _buildAppointmentCardWrapper(
myAppointmentsViewModel.patientAppointmentsHistoryList[1],
);
}
return Container(); // Return empty container if not enough items
}
// Third slot: Shows ancillary orders or appointment
@ -996,9 +1021,14 @@ class _LandingPageState extends State<LandingPage> {
// );
}
return _buildAppointmentCardWrapper(
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
);
// Safety check: ensure list has at least 3 items
if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 2) {
return _buildAppointmentCardWrapper(
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
);
}
return Container(); // Return empty container if not enough items
}
// Queue Card Widget

@ -23,23 +23,23 @@ class HabibWalletCard extends StatelessWidget {
Widget build(BuildContext context) {
return Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true),
// Row(
// children: [
// LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
// SizedBox(width: 2.h),
// Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
// ],
// ),
],
).paddingSymmetrical(24.h, 0.h),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true),
// // Row(
// // children: [
// // LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
// // SizedBox(width: 2.h),
// // Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
// // ],
// // ),
// ],
// ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h),
Container(
// height: 150.h,
width: double.infinity,
width: 355.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24,
@ -104,7 +104,7 @@ class HabibWalletCard extends StatelessWidget {
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
],
),
Spacer(),
// Spacer(),
Utils.getPaymentMethods(),
],
);
@ -171,7 +171,7 @@ class HabibWalletCard extends StatelessWidget {
),
),
]),
).paddingSymmetrical(24.h, 0.h).onPress(() {
).paddingSymmetrical(0.h, 0.h).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: HabibWalletPage(),

@ -0,0 +1,189 @@
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_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.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/features/habib_wallet/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.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/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
class LakumWalletCard extends StatelessWidget {
const LakumWalletCard({super.key});
@override
Widget build(BuildContext context) {
return Column(
children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true),
// // Row(
// // children: [
// // LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
// // SizedBox(width: 2.h),
// // Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
// // ],
// // ),
// ],
// ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h),
Container(
// height: 150.h,
width: 355.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24,
),
child: Stack(children: [
Positioned(
right: 0,
child: ClipRRect(
borderRadius: BorderRadius.circular(24.0),
child: Utils.buildImgWithAssets(
icon: AppAssets.lakumLogo,
width: 150.h,
height: 150.h,
)),
),
Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
"Lakum Wallet".toText16(isBold: true, letterSpacing: -0.2),
// Container(
// height: 40.h,
// width: 40.h,
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
// color: AppColors.textColor,
// borderRadius: 8.h,
// ),
// child: Padding(
// padding: EdgeInsets.all(8.h),
// child: Utils.buildSvgWithAssets(
// icon: AppAssets.show_icon,
// width: 12.h,
// height: 12.h,
// fit: BoxFit.contain,
// ),
// ),
// ),
// ],
// ),
SizedBox(height: 4.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
return Row(
mainAxisSize: MainAxisSize.max,
children: [
Row(
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.saudi_riyal_icon,
iconColor: AppColors.inputLabelTextColor,
width: 24.h,
height: 24.h,
fit: BoxFit.contain,
),
SizedBox(width: 8.h),
NumberFormat.decimalPattern()
.format(habibWalletVM.habibWalletAmount)
.toString()
.toText32(isBold: true, isEnglishOnly: true)
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
],
),
// Spacer(),
Utils.getPaymentMethods(),
],
);
}),
],
),
SizedBox(height: 16.h),
Row(
children: [
Expanded(
flex: 6,
child: CustomButton(
height: 40.h,
icon: AppAssets.recharge_icon,
iconColor: AppColors.infoColor,
iconSize: 24.h,
backgroundColor: AppColors.infoColor.withAlpha(15),
textColor: AppColors.infoColor,
text: LocaleKeys.recharge.tr(context: context),
borderWidth: 0.w,
fontWeight: FontWeight.w600,
borderColor: AppColors.infoColor.withAlpha(15),
padding: EdgeInsets.fromLTRB(4, 0, 12, 0),
fontSize: 14.f,
onPressed: () {
Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage()));
},
),
),
SizedBox(width: 8.h),
Expanded(
flex: 1,
child: Container(
height: (isFoldable || isTablet) ? 50.h : 40.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.textColor,
borderRadius: 10.h,
side: BorderSide(
color: AppColors.textColor,
width: 1.2,
),
),
child: Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.whiteColor,
width: 24.w,
height: 24.h,
fit: BoxFit.contain,
),
),
).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: HabibWalletPage(),
),
);
}),
),
],
),
],
),
),
]),
).paddingSymmetrical(0.h, 0.h).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: HabibWalletPage(),
),
);
}),
],
);
}
}

@ -186,7 +186,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"${LocaleKeys.status.tr(context: context)}: ".toText14(isBold: true),
insuranceApprovalResponseModel.apporvalDetails![index]!.status!.toText12(isBold: true, color: AppColors.greyTextColor),
(insuranceApprovalResponseModel.apporvalDetails![index].status ?? "").toText12(isBold: true, color: AppColors.greyTextColor),
],
),
SizedBox(height: 8.h),
@ -194,7 +194,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"${LocaleKeys.usageStatus.tr(context: context)}: ".toText14(isBold: true),
(insuranceApprovalResponseModel.apporvalDetails![index]!.isInvoicedDesc ?? "").toText12(isBold: true, color: AppColors.greyTextColor),
(insuranceApprovalResponseModel.apporvalDetails![index].isInvoicedDesc ?? "").toText12(isBold: true, color: AppColors.greyTextColor),
],
),
],

@ -117,7 +117,7 @@ class InsuranceApprovalCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(isLoading ? "John Smith" : insuranceApprovalResponseModel.doctorName!).toText16(isBold: true).toShimmer2(isShow: isLoading),
(isLoading ? "John Smith" : insuranceApprovalResponseModel.doctorName ?? "").toText16(isBold: true).toShimmer2(isShow: isLoading),
SizedBox(height: 8.h),
Wrap(
direction: Axis.horizontal,
@ -128,7 +128,7 @@ class InsuranceApprovalCard extends StatelessWidget {
// backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withValues(alpha: 0.1) : AppColors.primaryRedColor.withValues(alpha: 0.1),
// textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
// ).toShimmer2(isShow: isLoading),
AppCustomChipWidget(labelText: isLoading ? "Cardiology" : insuranceApprovalResponseModel.clinicName!).toShimmer2(isShow: isLoading),
AppCustomChipWidget(labelText: isLoading ? "Cardiology" : insuranceApprovalResponseModel.clinicName ?? "").toShimmer2(isShow: isLoading),
Directionality(
textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(

@ -241,8 +241,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
AppCustomChipWidget(
icon: AppAssets.file_icon,
richText: "${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}"
.toText10(isEnglishOnly: true),
labelText: "${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
),
AppCustomChipWidget(

@ -123,9 +123,9 @@ class PatientSickLeaveCard extends StatelessWidget {
backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 14,
fontSize: 14.f,
isBold: true,
borderRadius: 12,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
icon: AppAssets.download,

@ -48,11 +48,11 @@ class AttachmentOptions extends StatelessWidget {
).onPress(() async {
await onGalleryTap();
}),
if (showFilesOption) SizedBox(height: 16.h),
if (!showFilesOption) SizedBox(height: 16.h),
if (showFilesOption)
checkInOptionCard(
appState,
AppAssets.files,
AppAssets.file_icon,
LocaleKeys.openFiles.tr(context: context),
LocaleKeys.selectDocumentFiles.tr(context: context),
).onPress(() async {

@ -265,7 +265,7 @@ void showCommonBottomSheetWithoutHeight(
builder: (BuildContext context) {
if (isAutoDismiss) {
Future.delayed(Duration(seconds: 2), () {
Navigator.of(context).pop();
Navigator.of(GetIt.instance<NavigationService>().navigatorKey.currentContext!).pop();
if (callBackFunc != null) {
callBackFunc();
}

@ -2,8 +2,8 @@ name: hmg_patient_app_new
description: "New HMG Patient App"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.25+24
#version: 0.0.1+23
#version: 0.0.30+29
version: 0.0.4+1
environment:
sdk: ">=3.6.0 <4.0.0"

Loading…
Cancel
Save