@ -87,7 +87,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [
Expanded (
child: CollapsingListView (
title: LocaleKeys . appointmentDetails . tr ( ) ,
title: LocaleKeys . appointmentDetails . tr ( context: context ) ,
report: AppointmentType . isArrived ( widget . patientAppointmentHistoryResponseModel )
? ( ) {
contactUsViewModel . setPatientFeedbackSelectedAppointment ( widget . patientAppointmentHistoryResponseModel ) ;
@ -105,7 +105,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
AppointmentDoctorCard (
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
onAskDoctorTap: ( ) async {
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . checkingDoctorAvailability . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . checkingDoctorAvailability . tr ( context: context ) ) ;
await myAppointmentsViewModel . isDoctorAvailable (
projectID: widget . patientAppointmentHistoryResponseModel . projectID ,
doctorId: widget . patientAppointmentHistoryResponseModel . doctorID ,
@ -135,7 +135,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
onCancelTap: ( ) async {
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . cancellingAppointmentPleaseWait . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . cancellingAppointmentPleaseWait . tr ( context: context ) ) ;
await myAppointmentsViewModel . cancelAppointment (
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
onSuccess: ( apiResponse ) {
@ -144,7 +144,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
showCommonBottomSheetWithoutHeight (
context ,
child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentCancelledSuccessfully . tr ( ) ) ,
child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentCancelledSuccessfully . tr ( context: context ) ) ,
callBackFunc: ( ) {
Navigator . of ( context ) . pop ( ) ;
} ,
@ -181,13 +181,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [
Row (
children: [
LocaleKeys . appointmentStatus . tr ( ) . toText16 ( isBold: true ) ,
LocaleKeys . appointmentStatus . tr ( context: context ) . toText16 ( isBold: true ) ,
] ,
) ,
SizedBox ( height: 4. h ) ,
( ! AppointmentType . isConfirmed ( widget . patientAppointmentHistoryResponseModel )
? LocaleKeys . notConfirmed . tr ( ) . toText12 ( color: AppColors . primaryRedColor , fontWeight: FontWeight . w500 )
: LocaleKeys . confirmed . tr ( ) . toText12 ( color: AppColors . successColor , fontWeight: FontWeight . w500 ) ) ,
? LocaleKeys . notConfirmed . tr ( context: context ) . toText12 ( color: AppColors . primaryRedColor , fontWeight: FontWeight . w500 )
: LocaleKeys . confirmed . tr ( context: context ) . toText12 ( color: AppColors . successColor , fontWeight: FontWeight . w500 ) ) ,
SizedBox ( height: 16. h ) ,
/ / TODO Add countdown timer in case of LiveCare Appointment
widget . patientAppointmentHistoryResponseModel . isLiveCareAppointment ? ? false
@ -199,7 +199,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
LocaleKeys . doctorWillCallYou . tr ( ) . toText14 ( color: AppColors . greyTextColor , weight: FontWeight . w500 ) ,
LocaleKeys . doctorWillCallYou . tr ( context: context ) . toText14 ( color: AppColors . greyTextColor , weight: FontWeight . w500 ) ,
] ,
) ,
) ,
@ -225,7 +225,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
MapsLauncher . launchCoordinates ( double . parse ( widget . patientAppointmentHistoryResponseModel . latitude ! ) ,
double . parse ( widget . patientAppointmentHistoryResponseModel . longitude ! ) , widget . patientAppointmentHistoryResponseModel . projectName ) ;
} ,
text: LocaleKeys . getDirections . tr ( ) ,
text: LocaleKeys . getDirections . tr ( context: context ) ,
backgroundColor: AppColors . textColor . withValues ( alpha: 0.8 ) ,
borderColor: AppointmentType . getNextActionButtonColor ( widget . patientAppointmentHistoryResponseModel . nextAction ) . withValues ( alpha: 0.01 ) ,
textColor: AppColors . whiteColor ,
@ -280,7 +280,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
LocaleKeys . setReminder . tr ( context: context ) . toText13 ( isBold: true ) ,
LocaleKeys . notifyMeBeforeAppointment . tr ( ) . toText11 ( color: AppColors . textColorLight , weight: FontWeight . w500 ) ,
LocaleKeys . notifyMeBeforeAppointment . tr ( context: context ) . toText11 ( color: AppColors . textColorLight , weight: FontWeight . w500 ) ,
] ,
) ,
const Spacer ( ) ,
@ -365,7 +365,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true ,
iconSize: 36. w ,
) . onPress ( ( ) async {
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingLabResults . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingLabResults . tr ( context: context ) ) ;
await labViewModel . getLabResultsByAppointmentNo (
appointmentNo: widget . patientAppointmentHistoryResponseModel . appointmentNo ,
projectID: widget . patientAppointmentHistoryResponseModel . projectID ,
@ -398,7 +398,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true ,
iconSize: 36. w ,
) . onPress ( ( ) async {
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingRadiologyResults . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingRadiologyResults . tr ( context: context ) ) ;
await radiologyViewModel . getPatientRadiologyOrdersByAppointment (
appointmentNo: widget . patientAppointmentHistoryResponseModel . appointmentNo ,
projectID: widget . patientAppointmentHistoryResponseModel . projectID ,
@ -425,7 +425,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true ,
iconSize: 36. w ,
) . onPress ( ( ) async {
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingAppointmentPrescriptions . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingAppointmentPrescriptions . tr ( context: context ) ) ;
await prescriptionsViewModel . getPrescriptionDetails (
getPrescriptionRequestModel ( ) ,
onSuccess: ( val ) {
@ -453,7 +453,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
} else {
showCommonBottomSheetWithoutHeight (
context ,
child: Utils . getErrorWidget ( loadingText: LocaleKeys . noPrescriptionsForAppointment . tr ( ) ) ,
child: Utils . getErrorWidget ( loadingText: LocaleKeys . noPrescriptionsForAppointment . tr ( context: context ) ) ,
callBackFunc: ( ) { } ,
isFullScreen: false ,
isCloseButtonVisible: true ,
@ -522,7 +522,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
/ / ] ,
/ / ) ,
/ / SizedBox ( height: 16. h ) ,
/ / LocaleKeys . prescriptions . tr ( ) . toText18 ( isBold: true ) ,
/ / LocaleKeys . prescriptions . tr ( context: context ) . toText18 ( isBold: true ) ,
/ / SizedBox ( height: 16. h ) ,
/ / Consumer < PrescriptionsViewModel > ( builder: ( context , prescriptionVM , child ) {
/ / return prescriptionVM . isPrescriptionsDetailsLoading
@ -708,7 +708,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
LocaleKeys . amountBeforeTax . tr ( ) . toText18 ( isBold: true ) ,
LocaleKeys . amountBeforeTax . tr ( context: context ) . toText18 ( isBold: true ) ,
Utils . getPaymentAmountWithSymbol (
widget . patientAppointmentHistoryResponseModel . patientShare ! . toString ( ) . toText16 ( isBold: true ) ,
AppColors . blackColor ,
@ -752,7 +752,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
) . paddingOnly ( left: 16. h , top: 24. h , right: 16. h , bottom: 0. h ) ,
AppointmentType . isArrived ( widget . patientAppointmentHistoryResponseModel )
? CustomButton (
text: LocaleKeys . rebookAppointment . tr ( ) ,
text: LocaleKeys . rebookAppointment . tr ( context: context ) ,
onPressed: ( ) {
openDoctorScheduleCalendar ( ) ;
} ,
@ -810,13 +810,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
projectName: widget . patientAppointmentHistoryResponseModel . projectName ,
) ;
bookAppointmentsViewModel . setSelectedDoctor ( doctor ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingDoctorSchedulePleaseWait . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingDoctorSchedulePleaseWait . tr ( context: context ) ) ;
await bookAppointmentsViewModel . getDoctorFreeSlots (
isBookingForLiveCare: false ,
onSuccess: ( dynamic respData ) async {
LoaderBottomSheet . hideLoader ( ) ;
showCommonBottomSheetWithoutHeight (
title: LocaleKeys . pickADate . tr ( ) ,
title: LocaleKeys . pickADate . tr ( context: context ) ,
context ,
child: AppointmentCalendar ( ) ,
isFullScreen: false ,
@ -841,14 +841,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
case 0 :
break ;
case 10 :
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . confirmingAppointmentPleaseWait . tr ( ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . confirmingAppointmentPleaseWait . tr ( context: context ) ) ;
await myAppointmentsViewModel . confirmAppointment (
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
onSuccess: ( apiResponse ) {
LoaderBottomSheet . hideLoader ( ) ;
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
showCommonBottomSheet ( context , child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentConfirmedSuccessfully . tr ( ) ) , callBackFunc: ( str ) {
showCommonBottomSheet ( context , child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentConfirmedSuccessfully . tr ( context: context ) ) , callBackFunc: ( str ) {
Navigator . of ( context ) . pop ( ) ;
} ,
title: " " ,
@ -869,10 +869,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
) ,
) ;
case 50 :
/ / return LocaleKeys . confirmLiveCare . tr ( ) ;
/ / return LocaleKeys . confirmLiveCare . tr ( context: context ) ;
case 90 :
showCommonBottomSheetWithoutHeight ( context ,
title: LocaleKeys . onlineCheckIn . tr ( ) ,
title: LocaleKeys . onlineCheckIn . tr ( context: context ) ,
child: AppointmentCheckinBottomSheet (
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
myAppointmentsViewModel: myAppointmentsViewModel ,