updates & fixes

pull/309/head
haroon amjad 2 days ago
parent 13cab04791
commit 7ef435690d

@ -4,7 +4,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; 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 // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -494,7 +494,7 @@ class PushNotificationHandler {
log("Push Notification getToken: ${token!}"); log("Push Notification getToken: ${token!}");
onToken(token!); onToken(token!);
}).catchError((err) { }).catchError((err) {
log(err); log(err.toString());
}); });
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) { FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {

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

@ -96,7 +96,13 @@ Future<void> callAppStateInitializations() async {
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics // Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) { 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; return true;
}; };
} }

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

@ -451,7 +451,7 @@ class _LandingPageState extends State<LandingPage> {
height: isTablet ? 290.h : 255.h, height: isTablet ? 290.h : 255.h,
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: 3, itemCount: myAppointmentsVM.patientAppointmentsHistoryList.length < 3 ? myAppointmentsVM.patientAppointmentsHistoryList.length : 3,
shrinkWrap: true, shrinkWrap: true,
padding: EdgeInsets.only(left: 16.h, right: 16.h), padding: EdgeInsets.only(left: 16.h, right: 16.h),
itemBuilder: (context, index) { itemBuilder: (context, index) {
@ -980,9 +980,14 @@ class _LandingPageState extends State<LandingPage> {
// ); // );
// } // }
return _buildAppointmentCardWrapper( // Safety check: ensure list has at least 2 items
myAppointmentsViewModel.patientAppointmentsHistoryList[1], 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 // Third slot: Shows ancillary orders or appointment
@ -996,9 +1001,14 @@ class _LandingPageState extends State<LandingPage> {
// ); // );
} }
return _buildAppointmentCardWrapper( // Safety check: ensure list has at least 3 items
myAppointmentsViewModel.patientAppointmentsHistoryList[2], if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 2) {
); return _buildAppointmentCardWrapper(
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
);
}
return Container(); // Return empty container if not enough items
} }
// Queue Card Widget // Queue Card Widget

@ -186,7 +186,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"${LocaleKeys.status.tr(context: context)}: ".toText14(isBold: true), "${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), SizedBox(height: 8.h),
@ -194,7 +194,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"${LocaleKeys.usageStatus.tr(context: context)}: ".toText14(isBold: true), "${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),
], ],
), ),
], ],

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

Loading…
Cancel
Save