Fixes & update to stores VersionID 21.3

pull/324/head
haroon amjad 3 weeks ago
parent 3590dfc511
commit bcdbfa99ed

@ -290,7 +290,7 @@ class ApiConsts {
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations"; static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api **************** // ************ static values for Api ****************
static final double appVersionID = 21.2; static final double appVersionID = 21.3;
// static final double appVersionID = 50.7; // static final double appVersionID = 50.7;
static final int appChannelId = 3; static final int appChannelId = 3;

@ -49,10 +49,10 @@ _incomingCall(Map<String, dynamic> data) async {
log('the value of the _incomingCall remote message is $data'); log('the value of the _incomingCall remote message is $data');
// Check if there's already a call in progress to prevent duplicates // Check if there's already a call in progress to prevent duplicates
if (_isCallInProgress && _currentCallId != null) { // if (_isCallInProgress && _currentCallId != null) {
log('⚠️ Call already in progress (ID: $_currentCallId), ignoring duplicate notification'); // log('⚠️ Call already in progress (ID: $_currentCallId), ignoring duplicate notification');
return; // return;
} // }
String roomID = data['session_id'] ?? ''; String roomID = data['session_id'] ?? '';
String callTypeID = data['AppointmentNo'] ?? ''; String callTypeID = data['AppointmentNo'] ?? '';

@ -117,6 +117,13 @@ class EmergencyServicesViewModel extends ChangeNotifier {
bool historyLoading = false; bool historyLoading = false;
OrderDislpay currentlyDisplayedOrder = OrderDislpay.ALL; OrderDislpay currentlyDisplayedOrder = OrderDislpay.ALL;
bool isAdvanceERBalanceNeedToBeLoaded = true;
setIsAdvanceERBalanceNeedToBeLoaded(bool value) {
isAdvanceERBalanceNeedToBeLoaded = value;
notifyListeners();
}
setSelectedRRTProcedure(RRTProceduresResponseModel procedure) { setSelectedRRTProcedure(RRTProceduresResponseModel procedure) {
selectedRRTProcedure = procedure; selectedRRTProcedure = procedure;
notifyListeners(); notifyListeners();
@ -331,6 +338,8 @@ class EmergencyServicesViewModel extends ChangeNotifier {
} }
Future<void> checkPatientERAdvanceBalance({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> checkPatientERAdvanceBalance({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isAdvanceERBalanceNeedToBeLoaded) return;
final result = await emergencyServicesRepo.checkPatientERAdvanceBalance(); final result = await emergencyServicesRepo.checkPatientERAdvanceBalance();
result.fold( result.fold(
@ -338,6 +347,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
(failure) { (failure) {
patientHasAdvanceERBalance = false; patientHasAdvanceERBalance = false;
isERBookAppointment = true; isERBookAppointment = true;
isAdvanceERBalanceNeedToBeLoaded = true;
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(failure.message); onSuccess(failure.message);
} }
@ -347,9 +357,11 @@ class EmergencyServicesViewModel extends ChangeNotifier {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
patientHasAdvanceERBalance = false; patientHasAdvanceERBalance = false;
isERBookAppointment = true; isERBookAppointment = true;
isAdvanceERBalanceNeedToBeLoaded = true;
} else if (apiResponse.messageStatus == 1) { } else if (apiResponse.messageStatus == 1) {
patientHasAdvanceERBalance = apiResponse.data; patientHasAdvanceERBalance = apiResponse.data;
isERBookAppointment = !patientHasAdvanceERBalance; isERBookAppointment = !patientHasAdvanceERBalance;
isAdvanceERBalanceNeedToBeLoaded = false;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);

@ -325,10 +325,12 @@ class HabibWalletViewModel extends ChangeNotifier {
} }
initHabibWalletProvider() { initHabibWalletProvider() {
isWalletAmountLoading = true; if (isWalletAmountToBeLoaded) {
isWalletAmountLoading = true;
habibWalletAmount = 0;
isLakumAccountInfoLoading = true;
}
isBottomSheetContentLoading = false; isBottomSheetContentLoading = false;
isLakumAccountInfoLoading = true;
habibWalletAmount = 0;
walletRechargeAmount = 0; walletRechargeAmount = 0;
selectedRechargeType = 1; selectedRechargeType = 1;
advancePaymentHospitals.clear(); advancePaymentHospitals.clear();
@ -538,6 +540,10 @@ class HabibWalletViewModel extends ChangeNotifier {
} }
Future<void> getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isWalletAmountToBeLoaded) {
return;
}
isLakumAccountInfoLoading = true; isLakumAccountInfoLoading = true;
lakumAccountInfo = LakumInquiryInformationResponseModel(); lakumAccountInfo = LakumInquiryInformationResponseModel();
notifyListeners(); notifyListeners();

@ -13,13 +13,13 @@ class TodoSectionViewModel extends ChangeNotifier {
String? notificationsCount = "0"; String? notificationsCount = "0";
initializeTodoSectionViewModel() async { initializeTodoSectionViewModel() async {
// if (isAncillaryOrdersNeedReloading) { if (isAncillaryOrdersNeedReloading) {
patientAncillaryOrdersList.clear(); patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true; isAncillaryOrdersLoading = true;
isAncillaryDetailsProceduresLoading = true; isAncillaryDetailsProceduresLoading = true;
notificationsCount = "0"; notificationsCount = "0";
getPatientOnlineAncillaryOrderList(); getPatientOnlineAncillaryOrderList();
// } }
getPatientDashboard(); getPatientDashboard();
} }
@ -67,9 +67,9 @@ class TodoSectionViewModel extends ChangeNotifier {
} }
Future<void> getPatientOnlineAncillaryOrderList({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientOnlineAncillaryOrderList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
// if (!isAncillaryOrdersNeedReloading) { if (!isAncillaryOrdersNeedReloading) {
// return; return;
// } }
patientAncillaryOrdersList.clear(); patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true; isAncillaryOrdersLoading = true;

@ -139,6 +139,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -228,6 +229,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -510,6 +512,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -590,6 +593,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: payfortViewModel.payfortCheckPaymentStatusResponseModel!.fortId!, paymentReference: payfortViewModel.payfortCheckPaymentStatusResponseModel!.fortId!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(

@ -136,23 +136,23 @@ class _HabibWalletState extends State<HabibWalletPage> {
}, },
), ),
), ),
SizedBox(width: 8.w), // SizedBox(width: 8.w),
Flexible( // Flexible(
child: CustomButton( // child: CustomButton(
height: 40.h, // height: 40.h,
icon: AppAssets.refundIcon, // icon: AppAssets.refundIcon,
iconSize: 24.w, // iconSize: 24.w,
backgroundColor: AppColors.successColor, // backgroundColor: AppColors.successColor,
textColor: Colors.white, // textColor: Colors.white,
text: LocaleKeys.withdraw.tr(context: context), // text: LocaleKeys.withdraw.tr(context: context),
borderWidth: 0.w, // borderWidth: 0.w,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
borderColor: Colors.transparent, // borderColor: Colors.transparent,
padding: EdgeInsets.fromLTRB(4, 0, 12, 0), // padding: EdgeInsets.fromLTRB(4, 0, 12, 0),
fontSize: 14.f, // fontSize: 14.f,
onPressed: () => Navigator.of(context).push(CustomPageRoute(page: WithdrawRequestCreatePage())), // onPressed: () => Navigator.of(context).push(CustomPageRoute(page: WithdrawRequestCreatePage())),
), // ),
), // ),
], ],
), ),
SizedBox(height: 24.h), SizedBox(height: 24.h),

@ -127,6 +127,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"), showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () { callBackFunc: () {
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider(); habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop(); Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
@ -228,6 +229,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"), showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () { callBackFunc: () {
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider(); habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop(); Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
@ -411,8 +413,9 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"), showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () { callBackFunc: () {
habibWalletVM.initHabibWalletProvider(); habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.getPatientBalanceAmount(); habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop(); Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop(); Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
}, isFullScreen: false, isCloseButtonVisible: true, isAutoDismiss: true); }, isFullScreen: false, isCloseButtonVisible: true, isAutoDismiss: true);
@ -503,6 +506,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"), showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () { callBackFunc: () {
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider(); habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop(); Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();

@ -213,6 +213,7 @@ class _LandingPageState extends State<LandingPage> {
habibWalletVM.getLakumAccountInformation(); habibWalletVM.getLakumAccountInformation();
// Refresh Ancillary Orders // Refresh Ancillary Orders
todoSectionViewModel.setIsAncillaryOrdersNeedReloading(true);
todoSectionViewModel.initializeTodoSectionViewModel(); todoSectionViewModel.initializeTodoSectionViewModel();
// Refresh Immediate LiveCare Data // Refresh Immediate LiveCare Data

@ -212,28 +212,28 @@ class InvoiceListCard extends StatelessWidget {
iconSize: 14.h, iconSize: 14.h,
), ),
), ),
if (getInvoicesListResponseModel.isAllowRefund == true) ...[ // if (getInvoicesListResponseModel.isAllowRefund == true) ...[
SizedBox(width: 8.w), // SizedBox(width: 8.w),
Expanded( // Expanded(
child: CustomButton( // child: CustomButton(
text: LocaleKeys.requestRefund.tr(context: context), // text: LocaleKeys.requestRefund.tr(context: context),
onPressed: () { // onPressed: () {
_handleRefundInvoiceTap(context); // _handleRefundInvoiceTap(context);
}, // },
icon: AppAssets.refundIcon, // icon: AppAssets.refundIcon,
iconColor: AppColors.caloriesCalculatorColor, // iconColor: AppColors.caloriesCalculatorColor,
backgroundColor: AppColors.blueColor.withValues(alpha: 0.14), // backgroundColor: AppColors.blueColor.withValues(alpha: 0.14),
borderColor: AppColors.primaryRedColor.withValues(alpha: 0.01), // borderColor: AppColors.primaryRedColor.withValues(alpha: 0.01),
textColor: AppColors.caloriesCalculatorColor, // textColor: AppColors.caloriesCalculatorColor,
fontSize: 14.f, // fontSize: 14.f,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
borderRadius: 12.r, // borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w), // padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h, // height: 40.h,
iconSize: 14.h, // iconSize: 14.h,
), // ),
), // ),
] // ]
], ],
), ),
], ],

@ -1,5 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_callkit_incoming/entities/call_event.dart'; import 'package:flutter_callkit_incoming/entities/call_event.dart';
import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart'; import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart';
@ -55,7 +57,13 @@ class _SplashScreenState extends State<SplashPage> {
await notificationService.initialize(onNotificationClick: (payload) { await notificationService.initialize(onNotificationClick: (payload) {
// Handle notification click here // Handle notification click here
}); });
ZoomService().initializeZoomSDK(); ZoomService().initializeZoomSDK();
// if (!kDebugMode) {
// _initializeClarity();
// }
if (isAppOpenedFromCall) { if (isAppOpenedFromCall) {
navigateToTeleConsult(); navigateToTeleConsult();
} else { } else {
@ -76,6 +84,15 @@ class _SplashScreenState extends State<SplashPage> {
// zoom.initSdk(initConfig); // zoom.initSdk(initConfig);
} }
void _initializeClarity() {
final config = ClarityConfig(
projectId: "x0qgorlez4", // You can find it on the Settings page of Clarity dashboard.
logLevel: LogLevel.Verbose, // Optional: Set the log level (Verbose, Debug, Info, Warning, Error, None)
);
Clarity.initialize(context, config);
}
navigateToTeleConsult() async { navigateToTeleConsult() async {
String roomID = await Utils.getStringFromPrefs(CacheConst.zoomRoomID); String roomID = await Utils.getStringFromPrefs(CacheConst.zoomRoomID);
String callTypeID = await Utils.getStringFromPrefs(CacheConst.callTypeID); String callTypeID = await Utils.getStringFromPrefs(CacheConst.callTypeID);

@ -105,6 +105,7 @@ dependencies:
in_app_review: ^2.0.11 in_app_review: ^2.0.11
flutter_paytabs_bridge: ^2.7.13 flutter_paytabs_bridge: ^2.7.13
clarity_flutter: 1.9.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

Loading…
Cancel
Save