Habib Wallet & Lakum card updates

Main_App_Replacement
Haroon Amjad 3 weeks ago
parent c9401a2307
commit 731654e395

@ -30,7 +30,35 @@ class HabibWalletViewModel extends ChangeNotifier {
num habibWalletAmount = 0; num habibWalletAmount = 0;
num walletRechargeAmount = 0; num walletRechargeAmount = 0;
String notesText = ""; String notesText = "";
bool isWalletAmountToBeLoaded = true; bool isWalletAmountToBeLoaded = false;
// ── Balance visibility (show/hide like a password field) ──────────────────
bool isWalletAmountHidden = true;
bool isLakumPointsHidden = true;
// Track whether data has already been fetched (to avoid re-calling APIs).
bool isWalletAmountFetched = false;
bool isLakumInfoFetched = false;
void toggleWalletAmountVisibility() {
isWalletAmountHidden = !isWalletAmountHidden;
notifyListeners();
// On first unhide, fetch the data if not already fetched.
if (!isWalletAmountHidden && !isWalletAmountFetched) {
isWalletAmountToBeLoaded = true;
getPatientBalanceAmount();
}
}
void toggleLakumPointsVisibility() {
isLakumPointsHidden = !isLakumPointsHidden;
notifyListeners();
// On first unhide, fetch the data if not already fetched.
if (!isLakumPointsHidden && !isLakumInfoFetched) {
isWalletAmountToBeLoaded = true;
getLakumAccountInformation();
}
}
bool isBottomSheetContentLoading = false; bool isBottomSheetContentLoading = false;
@ -70,6 +98,8 @@ class HabibWalletViewModel extends ChangeNotifier {
bool isLakumAccountInfoLoading = false; bool isLakumAccountInfoLoading = false;
LakumInquiryInformationResponseModel? lakumAccountInfo; LakumInquiryInformationResponseModel? lakumAccountInfo;
// Get all flattened transactions sorted by date descending // Get all flattened transactions sorted by date descending
List<PointsDetails> getAllLakumTransactions() { List<PointsDetails> getAllLakumTransactions() {
if (lakumAccountInfo?.gainedPointsAmountPerYear == null) { if (lakumAccountInfo?.gainedPointsAmountPerYear == null) {
@ -437,6 +467,7 @@ class HabibWalletViewModel extends ChangeNotifier {
isWalletAmountLoading = false; isWalletAmountLoading = false;
isWalletAmountToBeLoaded = false; isWalletAmountToBeLoaded = false;
isWalletAmountFetched = true;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);
@ -581,6 +612,7 @@ class HabibWalletViewModel extends ChangeNotifier {
); );
} }
isLakumAccountInfoLoading = false; isLakumAccountInfoLoading = false;
isLakumInfoFetched = true;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);

@ -726,7 +726,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
); );
}); });
} else { } else {
openPaymentURL("tamara"); openPaymentURL("TAMARA");
} }
}) })
: SizedBox.shrink(), : SizedBox.shrink(),

@ -471,7 +471,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
).paddingSymmetrical(16.h, 16.h), ).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA"; selectedPaymentMethod = "TAMARA";
openPaymentURL("tamara"); openPaymentURL("TAMARA");
}) })
: SizedBox.shrink(), : SizedBox.shrink(),
], ],

@ -128,9 +128,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
emergencyServicesViewModel.selectedHospital!.iD, emergencyServicesViewModel.selectedHospital!.iD,
appState.getAuthenticatedUser()!.patientId!, appState.getAuthenticatedUser()!.patientId!,
); );
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration("ER Online Check-In Payment", emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
"ER Online Check-In Payment",
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD); ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD);
paytabsViewModel.startCardPayment( paytabsViewModel.startCardPayment(
paymentOption: selectedPaymentMethod, paymentOption: selectedPaymentMethod,
@ -147,45 +145,46 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(), projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(),
onSuccess: (PaytabsTransactionResponseModel transactionData) async { onSuccess: (PaytabsTransactionResponseModel transactionData) async {
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
await emergencyServicesViewModel.ER_CreateAdvancePayment( await emergencyServicesViewModel.ER_CreateAdvancePayment(
paymentMethodName: selectedPaymentMethod, paymentMethodName: selectedPaymentMethod,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
onSuccess: (value) async { onSuccess: (value) async {
await emergencyServicesViewModel.addAdvanceNumberRequest( await emergencyServicesViewModel.addAdvanceNumberRequest(
advanceNumber: value, advanceNumber: value,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true); emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)), child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)),
callBackFunc: () { callBackFunc: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
CustomPageRoute( CustomPageRoute(
page: LandingNavigation(), page: LandingNavigation(),
), ),
(r) => false); (r) => false);
}, },
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
); );
} else {} } else {}
}); });
}); });
} else {} } else {}
}, onError: (errMsg) { },
showCommonBottomSheetWithoutHeight( onError: (errMsg) {
context, showCommonBottomSheetWithoutHeight(
child: Utils.getErrorWidget(loadingText: errMsg.toString()), context,
callBackFunc: () {}, child: Utils.getErrorWidget(loadingText: errMsg.toString()),
isFullScreen: false, callBackFunc: () {},
isCloseButtonVisible: true, isFullScreen: false,
); isCloseButtonVisible: true,
}); );
});
} else { } else {
openPaymentURL("mada"); openPaymentURL("mada");
} }
@ -235,9 +234,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
emergencyServicesViewModel.selectedHospital!.iD, emergencyServicesViewModel.selectedHospital!.iD,
appState.getAuthenticatedUser()!.patientId!, appState.getAuthenticatedUser()!.patientId!,
); );
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration("ER Online Check-In Payment", emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
"ER Online Check-In Payment",
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD); ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD);
paytabsViewModel.startCardPayment( paytabsViewModel.startCardPayment(
paymentOption: selectedPaymentMethod, paymentOption: selectedPaymentMethod,
@ -254,45 +251,46 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(), projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(),
onSuccess: (PaytabsTransactionResponseModel transactionData) async { onSuccess: (PaytabsTransactionResponseModel transactionData) async {
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
await emergencyServicesViewModel.ER_CreateAdvancePayment( await emergencyServicesViewModel.ER_CreateAdvancePayment(
paymentMethodName: selectedPaymentMethod, paymentMethodName: selectedPaymentMethod,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
onSuccess: (value) async { onSuccess: (value) async {
await emergencyServicesViewModel.addAdvanceNumberRequest( await emergencyServicesViewModel.addAdvanceNumberRequest(
advanceNumber: value, advanceNumber: value,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true); emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)), child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)),
callBackFunc: () { callBackFunc: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
CustomPageRoute( CustomPageRoute(
page: LandingNavigation(), page: LandingNavigation(),
), ),
(r) => false); (r) => false);
}, },
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
); );
} else {} } else {}
}); });
}); });
} else {} } else {}
}, onError: (errMsg) { },
showCommonBottomSheetWithoutHeight( onError: (errMsg) {
context, showCommonBottomSheetWithoutHeight(
child: Utils.getErrorWidget(loadingText: errMsg.toString()), context,
callBackFunc: () {}, child: Utils.getErrorWidget(loadingText: errMsg.toString()),
isFullScreen: false, callBackFunc: () {},
isCloseButtonVisible: true, isFullScreen: false,
); isCloseButtonVisible: true,
}); );
});
} else { } else {
openPaymentURL("visa"); openPaymentURL("visa");
} }
@ -332,7 +330,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
).paddingSymmetrical(16.h, 16.h), ).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA"; selectedPaymentMethod = "TAMARA";
openPaymentURL("tamara"); openPaymentURL("TAMARA");
}) })
: SizedBox.shrink(), : SizedBox.shrink(),
], ],
@ -353,39 +351,39 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [ children: [
(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.isCash ?? true) (emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.isCash ?? true)
? Container( ? Container(
height: 50.h, height: 50.h,
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: AppColors.secondaryLightRedBorderColor, color: AppColors.secondaryLightRedBorderColor,
shape: SmoothRectangleBorder( shape: SmoothRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)), borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
smoothness: 1, smoothness: 1,
), ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(24.h, 0.h),
CustomButton( CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context), text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () { onPressed: () {
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: InsuranceHomePage(), page: InsuranceHomePage(),
), ),
); );
}, },
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.secondaryLightRedBorderColor, borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 10, fontSize: 10,
isBold: true, isBold: true,
borderRadius: 8, borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0), padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 30.h, height: 30.h,
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
], ],
), ),
) )
: const SizedBox(), : const SizedBox(),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
@ -403,7 +401,9 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [ children: [
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor), LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
13,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
@ -417,14 +417,8 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
Platform.isIOS Platform.isIOS
? Utils.buildSvgWithAssets( ? Utils.buildSvgWithAssets(icon: AppAssets.apple_pay_button, width: 200.h, height: 80.h, fit: BoxFit.contain, applyThemeColor: false).paddingSymmetrical(24.h, 0.h).onPress(() {
icon: AppAssets.apple_pay_button, if (Utils.havePrivilege(103)) {
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
if (Utils.havePrivilege(103)) {
startApplePay(); startApplePay();
} else { } else {
openPaymentURL("ApplePay"); openPaymentURL("ApplePay");
@ -530,9 +524,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
if (appState.isPaytabsEnabled) { if (appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA"; selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration("ER Online Check-In Payment", emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
"ER Online Check-In Payment",
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD); ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD);
paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async { paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));

@ -159,9 +159,11 @@ class _LandingPageState extends State<LandingPage> {
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
Clarity.setCustomUserId(appState.getAuthenticatedUser()!.patientId.toString()); Clarity.setCustomUserId(appState.getAuthenticatedUser()!.patientId.toString());
habibWalletVM.initHabibWalletProvider(); // habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); // Wallet & Lakum data are fetched lazily when the user unhides the values.
habibWalletVM.getLakumAccountInformation(); // habibWalletVM.getPatientBalanceAmount();
// habibWalletVM.getLakumAccountInformation();
todoSectionViewModel.initializeTodoSectionViewModel(); todoSectionViewModel.initializeTodoSectionViewModel();
immediateLiveCareViewModel.initImmediateLiveCare(); immediateLiveCareViewModel.initImmediateLiveCare();
immediateLiveCareViewModel.getPatientLiveCareHistory(); immediateLiveCareViewModel.getPatientLiveCareHistory();
@ -234,9 +236,9 @@ class _LandingPageState extends State<LandingPage> {
myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true); myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true);
// Refresh Appointments Data // Refresh Appointments Data
habibWalletVM.initHabibWalletProvider(); // habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); // habibWalletVM.getPatientBalanceAmount();
habibWalletVM.getLakumAccountInformation(); // habibWalletVM.getLakumAccountInformation();
// Refresh Ancillary Orders // Refresh Ancillary Orders
todoSectionViewModel.setIsAncillaryOrdersNeedReloading(true); todoSectionViewModel.setIsAncillaryOrdersNeedReloading(true);
@ -952,7 +954,7 @@ class _LandingPageState extends State<LandingPage> {
children: [ children: [
LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox( SizedBox(
height: 175.h, height: 180.h,
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: 2, itemCount: 2,

@ -59,26 +59,19 @@ class HabibWalletCard extends StatelessWidget {
// Row( // Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [ // children: [
LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2), Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
// Container( return Row(
// height: 40.h, mainAxisAlignment: MainAxisAlignment.spaceBetween,
// width: 40.h, children: [
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration( LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
// color: AppColors.textColor, Icon(
// borderRadius: 8.h, habibWalletVM.isWalletAmountHidden ? Icons.visibility_off : Icons.visibility,
// ), color: AppColors.textColor,
// child: Padding( size: 24.h,
// padding: EdgeInsets.all(8.h), ).onPress(() => habibWalletVM.toggleWalletAmountVisibility()),
// child: Utils.buildSvgWithAssets( ],
// icon: AppAssets.show_icon, );
// width: 12.h, }),
// height: 12.h,
// fit: BoxFit.contain,
// ),
// ),
// ),
// ],
// ),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -98,9 +91,9 @@ class HabibWalletCard extends StatelessWidget {
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
NumberFormat.decimalPattern() (habibWalletVM.isWalletAmountHidden
.format(habibWalletVM.habibWalletAmount) ? "••••"
.toString() : NumberFormat.decimalPattern().format(habibWalletVM.habibWalletAmount).toString())
.toText32(isBold: true, isEnglishOnly: true) .toText32(isBold: true, isEnglishOnly: true)
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h), .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
], ],

@ -67,26 +67,19 @@ class LakumWalletCard extends StatelessWidget {
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [ // children: [
// LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2), // LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
LocaleKeys.lakumPoints.tr(context: context).toText16(isBold: true, letterSpacing: -0.2), Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
// Container( return Row(
// height: 40.h, mainAxisAlignment: MainAxisAlignment.spaceBetween,
// width: 40.h, children: [
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration( LocaleKeys.lakumPoints.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
// color: AppColors.textColor, Icon(
// borderRadius: 8.h, habibWalletVM.isLakumPointsHidden ? Icons.visibility_off : Icons.visibility,
// ), color: AppColors.textColor,
// child: Padding( size: 24.h,
// padding: EdgeInsets.all(8.h), ).onPress(() => habibWalletVM.toggleLakumPointsVisibility()),
// child: Utils.buildSvgWithAssets( ],
// icon: AppAssets.show_icon, );
// width: 12.h, }),
// height: 12.h,
// fit: BoxFit.contain,
// ),
// ),
// ),
// ],
// ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -98,13 +91,15 @@ class LakumWalletCard extends StatelessWidget {
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
NumberFormat.decimalPattern() (habibWalletVM.isLakumPointsHidden
.format(habibWalletVM.isLakumAccountInfoLoading ? "••••"
? 123 : NumberFormat.decimalPattern()
: habibWalletVM.yahalaAccountNumber == "0" .format(habibWalletVM.isLakumAccountInfoLoading
? 0 ? 123
: (habibWalletVM.lakumAccountInfo?.pointsBalance ?? 0)) : habibWalletVM.yahalaAccountNumber == "0"
.toString() ? 0
: (habibWalletVM.lakumAccountInfo?.pointsBalance ?? 0))
.toString())
.toText32(isBold: true, isEnglishOnly: true) .toText32(isBold: true, isEnglishOnly: true)
.toShimmer2(isShow: habibWalletVM.isLakumAccountInfoLoading, radius: 12.h, width: 80.h, height: 40.h), .toShimmer2(isShow: habibWalletVM.isLakumAccountInfoLoading, radius: 12.h, width: 80.h, height: 40.h),
SizedBox(width: 4.h), SizedBox(width: 4.h),

@ -187,7 +187,7 @@ class MyInAppBrowser extends InAppBrowser {
// if (context != null) GifLoaderDialogUtils.hideDialog(context); // if (context != null) GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err); // AppToast.showErrorToast(message: err);
// }); // });
} else if (paymentMethod == "TAMARA") { } else if (paymentMethod.toLowerCase() == "tamara") {
// LiveCareService service = new LiveCareService(); // LiveCareService service = new LiveCareService();
TamaraRequestModel tamaraRequestModel = new TamaraRequestModel(); TamaraRequestModel tamaraRequestModel = new TamaraRequestModel();

Loading…
Cancel
Save