diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart index 1cbe3be2..38c6c7d3 100644 --- a/lib/presentation/appointments/widgets/appointment_card.dart +++ b/lib/presentation/appointments/widgets/appointment_card.dart @@ -637,6 +637,7 @@ class _AppointmentCardState extends State { } void _goToDetails(BuildContext context) { + if (widget.isLoading) return; if (widget.isFromMedicalReport) return; if (widget.isForEyeMeasurements) { Navigator.of(context).push( diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 8738a449..e1bf4940 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -165,11 +165,12 @@ class AppointmentDoctorCard extends StatelessWidget { ], ), ), - (patientAppointmentHistoryResponseModel.isLiveCareAppointment! || - patientAppointmentHistoryResponseModel.isExecludeDoctor! || - patientAppointmentHistoryResponseModel.isClinicReBookingAllowed! == false || - patientAppointmentHistoryResponseModel.isActiveDoctor! == false || - !Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID)) + (patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? + false || + (patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) || + patientAppointmentHistoryResponseModel.isClinicReBookingAllowed! == false || + (patientAppointmentHistoryResponseModel.isActiveDoctor ?? true) == false || + !Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID)) ? SizedBox.shrink() : Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_icon, width: 20.h, height: 20.h, fit: BoxFit.scaleDown) .onPress(() async { @@ -265,7 +266,7 @@ class AppointmentDoctorCard extends StatelessWidget { // : SizedBox.shrink(); } else { - return patientAppointmentHistoryResponseModel.isLiveCareAppointment! + return (patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ? CustomButton( text: LocaleKeys.cancel.tr(), onPressed: () {