PayTabs Tamara updates

pull/363/head
haroon amjad 2 months ago
parent 15bcb5814b
commit 0772beed1b

@ -3,6 +3,11 @@ class PaymentSdkDefaultConfig {
static const String profileID = "119730";
static const String serverKey = "SWJ9LD22MT-JLJZLBKTLK-WGWTLWGTWR";
static const String clientKey = "C7K2DQ-PDDN6B-69B2K7-P9GB9T";
// static const String profileID = "135577";
// static const String serverKey = "SDJ9LD22LR-J9LRBKZDRD-ZRZKWDWBRR";
// static const String clientKey = "CBK2DQ-PDPN6P-BR2K9D-VPBTB2";
static const String defaultCurrency = "SAR";
static const double defaultAmount = 10.0;
static const String defaultMerchantCountryCode = "SA";

@ -57,7 +57,8 @@ class PayTabsViewModel extends ChangeNotifier {
amount: amount.toDouble(),
showBillingInfo: false,
forceShippingInfo: false,
currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
// currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
currencyCode: getIt.get<AppState>().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED",
merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode,
billingDetails: BillingDetails(
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient",
@ -126,7 +127,8 @@ class PayTabsViewModel extends ChangeNotifier {
amount: amount.toDouble(),
showBillingInfo: false,
forceShippingInfo: false,
currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
// currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
currencyCode: getIt.get<AppState>().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED",
merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode,
billingDetails: BillingDetails("${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient",
"CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"),
@ -398,7 +400,6 @@ class PayTabsViewModel extends ChangeNotifier {
tamaraRequestModel.accessCode = getIt.get<AppState>().getAuthenticatedUser()!.mobileNumber!;
tamaraRequestModel.appointmentNo = appointmentNo;
tamaraRequestModel.customerName = "${getIt.get<AppState>().getAuthenticatedUser()!.firstName} ${getIt.get<AppState>().getAuthenticatedUser()!.lastName}";
;
tamaraRequestModel.fileNumber = fileNumber;
tamaraRequestModel.patientOutSA = getIt.get<AppState>().getAuthenticatedUser()!.outSa == 1 ? true : false;
tamaraRequestModel.deviceToken = await Utils.getStringFromPrefs(CacheConst.pushToken);

@ -632,7 +632,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA";
transID = Utils.getAppointmentTransID(
widget.patientAppointmentHistoryResponseModel.projectID,
widget.patientAppointmentHistoryResponseModel.clinicID,
@ -660,86 +659,64 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
await payfortViewModel.updateTamaraRequestStatus(responseMessage: "success", status: "14", clientRequestID: transID, tamaraOrderID: tamaraOrderID);
await payfortViewModel.markAppointmentAsTamaraPaid(
projectID: widget.patientAppointmentHistoryResponseModel.projectID, appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo);
await myAppointmentsViewModel.createAdvancePayment(
paymentMethodName: selectedPaymentMethod,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo.toString(),
payedAmount: num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
paymentReference: transactionData.transactionReference!,
patientID: appState.getAuthenticatedUser()!.patientId.toString(),
patientType: appState.getAuthenticatedUser()!.patientType!,
onSuccess: (value) async {
print(value);
await myAppointmentsViewModel.addAdvanceNumberRequest(
advanceNumber: "Tamara-Advance-0000",
paymentReference: transactionData.transactionReference!,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo.toString(),
onSuccess: (value) async {
if (widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment!) {
//TODO: Implement LiveCare Check-In API Call
await myAppointmentsViewModel.insertLiveCareVIDARequest(
clientRequestID: transID,
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
await myAppointmentsViewModel.addAdvanceNumberRequest(
advanceNumber: "Tamara-Advance-0000",
paymentReference: transactionData.transactionReference!,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo.toString(),
onSuccess: (value) async {
if (widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment!) {
//TODO: Implement LiveCare Check-In API Call
await myAppointmentsViewModel.insertLiveCareVIDARequest(
clientRequestID: transID,
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
getIt.get<HabibWalletViewModel>().setIsWalletAmountToBeLoaded(true);
getIt.get<HabibWalletViewModel>().initHabibWalletProvider();
getIt.get<HabibWalletViewModel>().getPatientBalanceAmount();
getIt.get<HabibWalletViewModel>().setIsWalletAmountToBeLoaded(true);
getIt.get<HabibWalletViewModel>().initHabibWalletProvider();
getIt.get<HabibWalletViewModel>().getPatientBalanceAmount();
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
});
},
onError: (error) {});
} else {
await myAppointmentsViewModel.generateAppointmentQR(
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo.toString(),
isFollowUp: myAppointmentsViewModel.patientAppointmentShareResponseModel!.isFollowup!,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
});
},
onError: (error) {});
} else {
await myAppointmentsViewModel.generateAppointmentQR(
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo.toString(),
isFollowUp: myAppointmentsViewModel.patientAppointmentShareResponseModel!.isFollowup!,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
getIt.get<HabibWalletViewModel>().setIsWalletAmountToBeLoaded(true);
getIt.get<HabibWalletViewModel>().initHabibWalletProvider();
getIt.get<HabibWalletViewModel>().getPatientBalanceAmount();
getIt.get<HabibWalletViewModel>().setIsWalletAmountToBeLoaded(true);
getIt.get<HabibWalletViewModel>().initHabibWalletProvider();
getIt.get<HabibWalletViewModel>().getPatientBalanceAmount();
LoaderBottomSheet.hideLoader();
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
});
LoaderBottomSheet.hideLoader();
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
});
}
});
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err.toString()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
});
}, onError: (err) async {
});
}
});
}, onError: (err) async {
await payfortViewModel.updateTamaraRequestStatus(responseMessage: "Failed", status: "00", clientRequestID: transID, tamaraOrderID: tamaraOrderID);
showCommonBottomSheetWithoutHeight(
context,

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart';
@ -60,6 +61,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
@override
void initState() {
Clarity.setCurrentScreenName('LiveCare Payment Page');
scheduleMicrotask(() {
payfortViewModel.initPayfortViewModel();
myAppointmentsViewModel.getTamaraInstallmentsDetails().then((val) {
@ -462,7 +464,60 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA";
openPaymentURL("tamara");
transID = Utils.getAppointmentTransID(
immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID!,
ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12,
DateTime.now().millisecondsSinceEpoch,
);
if (appState.isPaytabsEnabled) {
paytabsViewModel.setAlternatePaymentConfiguration(
"LiveCare Payment", num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()));
paytabsViewModel.startAlternatePayment(
liveServiceID: immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID.toString(),
appointmentDate: "",
appointmentNo: "",
doctorID: "",
transactionID: transID,
amount: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0",
fileNumber: appState.getAuthenticatedUser()!.patientId.toString(),
serviceID: "4",
projectID: "12",
isSchedule: false,
onSuccess: (PaytabsTransactionResponseModel transactionData) async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr());
tamaraOrderID = transactionData.cartID!;
await payfortViewModel.updateTamaraRequestStatus(responseMessage: "success", status: "14", clientRequestID: transID, tamaraOrderID: tamaraOrderID);
await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare(transID);
await immediateLiveCareViewModel.getPatientLiveCareHistory();
LoaderBottomSheet.hideLoader();
if (immediateLiveCareViewModel.patientHasPendingLiveCareRequest) {
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
Navigator.of(context).push(
CustomPageRoute(
page: ImmediateLiveCarePendingRequestPage(),
),
);
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
}
},
onError: (err) async {},
);
} else {
openPaymentURL("TAMARA");
}
})
: SizedBox.shrink(),
],
@ -524,17 +579,24 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr().toText14(isBold: true),
Utils.getPaymentAmountWithSymbol((immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount ?? "0.0").toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true),
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount ?? "0.0").toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true),
),
],
).paddingSymmetrical(24.h, 0.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.vat15.tr().toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax ?? "0.0").toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: true),
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax ?? "0.0").toString().toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
13,
isSaudiCurrency: true),
),
],
).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h),
@ -542,8 +604,11 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol((immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0").toString().toText24(isBold: true), AppColors.blackColor, 17,
isSaudiCurrency: true),
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0").toString().toText24(isBold: true), AppColors.blackColor, 17,
isSaudiCurrency: true),
),
],
).paddingSymmetrical(24.h, 0.h),
Platform.isIOS

@ -932,7 +932,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
bookAppointmentsViewModel.setSelectedClinic(clinic);
bookAppointmentsViewModel.setIsDoctorsListLoading(true);
searchEditingController.text = "";
if (clinic.isLiveCareClinicAndOnline ?? false) {
if (appState.isAuthenticated && (clinic.isLiveCareClinicAndOnline ?? false)) {
Navigator.of(context).push(
CustomPageRoute(
page: SelectLivecareClinicPage(

@ -86,7 +86,7 @@ class DoctorCard extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false),
SizedBox(height: 2.h),
"${isLoading ? 4.78 : doctorsListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor, isEnglishOnly: true),
"${isLoading ? 4.78 : doctorsListResponseModel.decimalDoctorRate ?? 5.0}".toText11(isBold: true, color: AppColors.textColor, isEnglishOnly: true),
],
),
).circle(100).toShimmer2(isShow: isLoading),

@ -3,6 +3,7 @@ import 'dart:developer';
import 'dart:io';
import 'package:amazon_payfort/amazon_payfort.dart';
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -54,6 +55,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
@override
void initState() {
Clarity.setCurrentScreenName('Habib Wallet Payment Page');
scheduleMicrotask(() {
payfortViewModel.initPayfortViewModel();
});
@ -509,9 +511,11 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.totalAmountToPay.tr(context: context).toText16(isBold: true),
Utils.getPaymentAmountWithSymbol(
NumberFormat.decimalPattern().format(habibWalletVM.walletRechargeAmount).toString().toText24(isBold: true, isEnglishOnly: true), AppColors.blackColor, 15.h,
isSaudiCurrency: true),
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
NumberFormat.decimalPattern().format(habibWalletVM.walletRechargeAmount).toString().toText24(isBold: true, isEnglishOnly: true), AppColors.blackColor, 15.h,
isSaudiCurrency: true),
),
],
).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 12.h),

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -77,25 +78,10 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
@override
void initState() {
Clarity.setCurrentScreenName('Ancillary Payment Page');
scheduleMicrotask(() {
payfortViewModel.initPayfortViewModel();
payfortViewModel.setIsApplePayConfigurationLoading(false);
myAppointmentsViewModel.getTamaraInstallmentsDetails().then((val) {
// if (myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel != null && myAppointmentsViewModel.patientAppointmentShareResponseModel != null) {
if (myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel != null &&
myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel?.minLimit?.amount != null &&
myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel?.maxLimit?.amount != null) {
if (widget.totalAmount >= myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel!.minLimit!.amount! &&
widget.totalAmount <= myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel!.maxLimit!.amount!) {
if (mounted) {
setState(() {
isShowTamara = true;
});
}
}
}
});
});
super.initState();
}
@ -393,84 +379,6 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
}
}),
SizedBox(height: 16.h),
isShowTamara
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildImgWithAssets(icon: AppAssets.tamaraEng, width: 72.h, height: 25.h).toShimmer2(isShow: false),
SizedBox(height: 16.h),
LocaleKeys.tamara.tr(context: context).toText16(isBold: true).toShimmer2(isShow: false),
],
),
SizedBox(width: 8.h),
const Spacer(),
Transform.flip(
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
).toShimmer2(isShow: false),
),
],
).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA";
transID = Utils.getAppointmentTransID(
widget.projectID,
widget.clinicID,
widget.appointmentNoVida,
);
if (appState.isPaytabsEnabled) {
paytabsViewModel.setAlternatePaymentConfiguration("Ancillary Order Payment", widget.totalAmount);
paytabsViewModel.startAlternatePayment(
liveServiceID: "0",
appointmentDate: DateUtil.convertDateToString(widget.appointmentDate!),
appointmentNo: widget.appointmentNoVida.toString(),
doctorID: "0",
transactionID: transID,
amount: widget.totalAmount.toString(),
fileNumber: appState.getAuthenticatedUser()!.patientId.toString(),
serviceID: "2",
projectID: widget.projectID.toString(),
isSchedule: false,
onSuccess: (PaytabsTransactionResponseModel transactionData) async {
tamaraOrderID = transactionData.cartID!;
// transID = transactionData.transactionReference!;
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
await payfortViewModel.updateTamaraRequestStatus(responseMessage: "success", status: "14", clientRequestID: transID, tamaraOrderID: tamaraOrderID);
_createAdvancePayment(
paymentAmount: widget.totalAmount,
paymentReference: transactionData.transactionReference!,
paymentMethod: selectedPaymentMethod,
);
},
onError: (err) async {
await payfortViewModel.updateTamaraRequestStatus(responseMessage: "Failed", status: "00", clientRequestID: transID, tamaraOrderID: tamaraOrderID);
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err.toString()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
});
} else {
_openPaymentURL("tamara");
}
})
: SizedBox.shrink(),
],
),
),
@ -514,11 +422,13 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
amountBeforeTax.toStringAsFixed(2).toText16(isBold: true),
AppColors.blackColor,
13,
isSaudiCurrency: true,
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
amountBeforeTax.toStringAsFixed(2).toText16(isBold: true),
AppColors.blackColor,
13,
isSaudiCurrency: true,
),
),
],
).paddingSymmetrical(24.h, 0.h),
@ -528,11 +438,13 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
taxAmount.toStringAsFixed(2).toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
13,
isSaudiCurrency: true,
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
taxAmount.toStringAsFixed(2).toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
13,
isSaudiCurrency: true,
),
),
],
).paddingSymmetrical(24.h, 0.h),
@ -544,11 +456,13 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
widget.totalAmount.toStringAsFixed(2).toText24(isBold: true),
AppColors.blackColor,
17,
isSaudiCurrency: true,
ClarityUnmask(
child: Utils.getPaymentAmountWithSymbol(
widget.totalAmount.toStringAsFixed(2).toText24(isBold: true),
AppColors.blackColor,
17,
isSaudiCurrency: true,
),
),
],
).paddingSymmetrical(24.h, 0.h),

@ -34,6 +34,7 @@ class _ToDoPageState extends State<ToDoPage> {
scheduleMicrotask(() async {
if (appState.isAuthenticated) {
await todoSectionViewModel.initializeTodoSectionViewModel();
todoSectionViewModel.setProcessingPayment(false);
}
});
super.initState();

@ -13,9 +13,11 @@ import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.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/enums.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/main.dart';
import 'package:hmg_patient_app_new/presentation/home/app_update_page.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/presentation/onboarding/onboarding_screen.dart';
@ -58,6 +60,9 @@ class _SplashScreenState extends State<SplashPage> {
() async {
ApiConsts.setBackendURLs();
PushNotificationHandler().init(context); // Asyncronously
// if (ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat) {
// HttpOverrides.global = MyHttpOverrides();
// }
},
);

Loading…
Cancel
Save