@ -262,7 +262,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Expanded (
Expanded (
child: CollapsingListView (
child: CollapsingListView (
title: LocaleKeys . appointmentDetails . tr ( context: context ) ,
title: LocaleKeys . appointmentDetails . tr ( context: context ) ,
report: AppointmentType . isArrived ( widget . patientAppointmentHistoryResponseModel ) & & widget . patientAppointmentHistoryResponseModel . isLiveCareAppointment = = false & & widget . patientAppointmentHistoryResponseModel . isClinicReBookingAllowed ! = = true & & widget . patientAppointmentHistoryResponseModel . isActiveDoctor ! = = true
report: AppointmentType . isArrived ( widget . patientAppointmentHistoryResponseModel ) & &
widget . patientAppointmentHistoryResponseModel . isLiveCareAppointment = = false & &
widget . patientAppointmentHistoryResponseModel . isClinicReBookingAllowed ! = = true & &
widget . patientAppointmentHistoryResponseModel . isActiveDoctor ! = = true
? ( ) {
? ( ) {
contactUsViewModel . setSelectedFeedbackType ( FeedbackType ( id: 1 , nameEN: " Complaint for appointment " , nameAR: ' شكوى على موعد ' ) ) ;
contactUsViewModel . setSelectedFeedbackType ( FeedbackType ( id: 1 , nameEN: " Complaint for appointment " , nameAR: ' شكوى على موعد ' ) ) ;
contactUsViewModel . setPatientFeedbackSelectedAppointment ( widget . patientAppointmentHistoryResponseModel ) ;
contactUsViewModel . setPatientFeedbackSelectedAppointment ( widget . patientAppointmentHistoryResponseModel ) ;
@ -280,8 +283,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [
children: [
AppointmentDoctorCard (
AppointmentDoctorCard (
/ / renderWidgetForERDisplay: ( ( widget . patientAppointmentHistoryResponseModel . isLiveCareAppointment ? ? false ) | |
/ / renderWidgetForERDisplay: ( ( widget . patientAppointmentHistoryResponseModel . isLiveCareAppointment ? ? false ) | |
renderWidgetForERDisplay:
renderWidgetForERDisplay: ( ( widget . patientAppointmentHistoryResponseModel . isExecludeDoctor ? ? false ) | |
( ( widget . patientAppointmentHistoryResponseModel . isExecludeDoctor ? ? false ) | | ! Utils . isClinicAllowedForRebook ( widget . patientAppointmentHistoryResponseModel . clinicID ) ) ,
! Utils . isClinicAllowedForRebook ( widget . patientAppointmentHistoryResponseModel . clinicID ) ) ,
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
onAskDoctorTap: ( ) async {
onAskDoctorTap: ( ) async {
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . checkingDoctorAvailability . tr ( context: context ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . checkingDoctorAvailability . tr ( context: context ) ) ;
@ -416,14 +419,17 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Row (
Row (
mainAxisSize: MainAxisSize . max ,
mainAxisSize: MainAxisSize . max ,
children: [
children: [
Utils . buildSvgWithAssets ( icon: AppAssets . prescription_reminder_icon , width: 40. w , height: 40. h , applyThemeColor: false ) ,
Utils . buildSvgWithAssets (
icon: AppAssets . prescription_reminder_icon , width: 40. w , height: 40. h , applyThemeColor: false ) ,
SizedBox ( width: 8. w ) ,
SizedBox ( width: 8. w ) ,
Column (
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
spacing: 4. h ,
spacing: 4. h ,
children: [
children: [
LocaleKeys . setReminder . tr ( context: context ) . toText13 ( isBold: true ) ,
LocaleKeys . setReminder . tr ( context: context ) . toText13 ( isBold: true ) ,
LocaleKeys . notifyMeBeforeAppointment . tr ( context: context ) . toText11 ( color: AppColors . textColorLight , isBold: true ) ,
LocaleKeys . notifyMeBeforeAppointment
. tr ( context: context )
. toText11 ( color: AppColors . textColorLight , isBold: true ) ,
] ,
] ,
) ,
) ,
const Spacer ( ) ,
const Spacer ( ) ,
@ -438,14 +444,17 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
inactiveCircleColor: AppColors . greyTextColor ,
inactiveCircleColor: AppColors . greyTextColor ,
activeIconColor: AppColors . bgGreenColor ,
activeIconColor: AppColors . bgGreenColor ,
inactiveIconColor: AppColors . greyTextColor ,
inactiveIconColor: AppColors . greyTextColor ,
activeIcon: Utils . buildSvgWithAssets ( icon: AppAssets . bell , iconColor: AppColors . whiteColor , width: 12. w , height: 12. h ) ,
activeIcon:
inactiveIcon: Utils . buildSvgWithAssets ( icon: AppAssets . bell , iconColor: AppColors . whiteColor , width: 12. w , height: 12. h ) ,
Utils . buildSvgWithAssets ( icon: AppAssets . bell , iconColor: AppColors . whiteColor , width: 12. w , height: 12. h ) ,
inactiveIcon:
Utils . buildSvgWithAssets ( icon: AppAssets . bell , iconColor: AppColors . whiteColor , width: 12. w , height: 12. h ) ,
onChanged: ( newValue ) async {
onChanged: ( newValue ) async {
CalenderUtilsNew calender = CalenderUtilsNew . instance ;
CalenderUtilsNew calender = CalenderUtilsNew . instance ;
bool isEventAddedOrRemoved = false ;
bool isEventAddedOrRemoved = false ;
if ( newValue = = true ) {
if ( newValue = = true ) {
DateTime startDate = DateTime . now ( ) ;
DateTime startDate = DateTime . now ( ) ;
DateTime endDate = DateUtil . convertStringToDate ( widget . patientAppointmentHistoryResponseModel . appointmentDate ) ;
DateTime endDate =
DateUtil . convertStringToDate ( widget . patientAppointmentHistoryResponseModel . appointmentDate ) ;
/ / Show reminder bottom sheet and check if permission was granted
/ / Show reminder bottom sheet and check if permission was granted
bool permissionGranted = await BottomSheetUtils ( ) . showReminderBottomSheet (
bool permissionGranted = await BottomSheetUtils ( ) . showReminderBottomSheet (
@ -460,7 +469,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
" ${ widget . patientAppointmentHistoryResponseModel . doctorNameObj } will be having an appointment on ${ widget . patientAppointmentHistoryResponseModel . appointmentDate } " ,
" ${ widget . patientAppointmentHistoryResponseModel . doctorNameObj } will be having an appointment on ${ widget . patientAppointmentHistoryResponseModel . appointmentDate } " ,
onSuccess: ( ) {
onSuccess: ( ) {
setState ( ( ) {
setState ( ( ) {
myAppointmentsViewModel . setAppointmentReminder ( newValue , widget . patientAppointmentHistoryResponseModel ) ;
myAppointmentsViewModel . setAppointmentReminder (
newValue , widget . patientAppointmentHistoryResponseModel ) ;
} ) ;
} ) ;
} ,
} ,
isMultiAllowed: true ,
isMultiAllowed: true ,
@ -470,16 +480,17 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
" Appointment Reminder with ${ widget . patientAppointmentHistoryResponseModel . doctorNameObj } on ${ DateUtil . convertStringToDate ( widget . patientAppointmentHistoryResponseModel . appointmentDate ) } , Appointment # ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " ,
" Appointment Reminder with ${ widget . patientAppointmentHistoryResponseModel . doctorNameObj } on ${ DateUtil . convertStringToDate ( widget . patientAppointmentHistoryResponseModel . appointmentDate ) } , Appointment # ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " ,
description:
description:
" Appointment Reminder with ${ widget . patientAppointmentHistoryResponseModel . doctorNameObj } in ${ widget . patientAppointmentHistoryResponseModel . projectName } " ,
" Appointment Reminder with ${ widget . patientAppointmentHistoryResponseModel . doctorNameObj } in ${ widget . patientAppointmentHistoryResponseModel . projectName } " ,
scheduleDateTime: DateUtil . convertStringToDate ( widget . patientAppointmentHistoryResponseModel . appointmentDate ) ,
scheduleDateTime:
DateUtil . convertStringToDate ( widget . patientAppointmentHistoryResponseModel . appointmentDate ) ,
eventId: " ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " ,
eventId: " ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " ,
location: ' ' ,
location: ' ' ,
reminderMinutes: selectedIndex ) ;
reminderMinutes: selectedIndex ) ;
setState ( ( ) {
setState ( ( ) {
myAppointmentsViewModel . setAppointmentReminder ( isEventAddedOrRemoved , widget . patientAppointmentHistoryResponseModel ) ;
myAppointmentsViewModel . setAppointmentReminder (
isEventAddedOrRemoved , widget . patientAppointmentHistoryResponseModel ) ;
} ) ;
} ) ;
} ,
} ,
isForAppointment: true
isForAppointment: true ) ;
) ;
/ / If permission was not granted , revert the switch back to OFF
/ / If permission was not granted , revert the switch back to OFF
if ( ! permissionGranted ) {
if ( ! permissionGranted ) {
@ -490,7 +501,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
id: " ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " ,
id: " ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " ,
) ;
) ;
setState ( ( ) {
setState ( ( ) {
myAppointmentsViewModel . setAppointmentReminder ( ! isEventAddedOrRemoved , widget . patientAppointmentHistoryResponseModel ) ;
myAppointmentsViewModel . setAppointmentReminder (
! isEventAddedOrRemoved , widget . patientAppointmentHistoryResponseModel ) ;
} ) ;
} ) ;
}
}
} ,
} ,
@ -581,8 +593,12 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
LocaleKeys . appointmentStatus . tr ( context: context ) . toText16 ( isBold: true ) ,
LocaleKeys . appointmentStatus . tr ( context: context ) . toText16 ( isBold: true ) ,
SizedBox ( height: 4. h ) ,
SizedBox ( height: 4. h ) ,
( ! AppointmentType . isConfirmed ( widget . patientAppointmentHistoryResponseModel )
( ! AppointmentType . isConfirmed ( widget . patientAppointmentHistoryResponseModel )
? LocaleKeys . notConfirmed . tr ( context: context ) . toText12 ( color: AppColors . primaryRedColor , isBold: true )
? LocaleKeys . notConfirmed
: LocaleKeys . confirmed . tr ( context: context ) . toText12 ( color: AppColors . successColor , isBold: true ) ) ,
. tr ( context: context )
. toText12 ( color: AppColors . primaryRedColor , isBold: true )
: LocaleKeys . confirmed
. tr ( context: context )
. toText12 ( color: AppColors . successColor , isBold: true ) ) ,
SizedBox ( height: 16. h ) ,
SizedBox ( height: 16. h ) ,
] ,
] ,
) ,
) ,
@ -640,7 +656,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
LocaleKeys . doctorWillCallYou . tr ( context: context ) . toText14 ( color: AppColors . greyTextColor , isBold: true ) ,
LocaleKeys . doctorWillCallYou
. tr ( context: context )
. toText14 ( color: AppColors . greyTextColor , isBold: true ) ,
] ,
] ,
) ,
) ,
) ,
) ,
@ -648,13 +666,17 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
)
)
: Stack (
: Stack (
children: [
children: [
ClipRRect (
SizedBox (
width: double . infinity ,
child: ClipRRect (
clipBehavior: Clip . hardEdge ,
clipBehavior: Clip . hardEdge ,
borderRadius: BorderRadius . circular ( 24. r ) ,
borderRadius: BorderRadius . circular ( 24. r ) ,
/ / Todo: what is this ? ? ? ? Api Key ? ? ? 😲
/ / Todo: what is this ? ? ? ? Api Key ? ? ? 😲
child: Image . network (
child: Image . network (
" https://maps.googleapis.com/maps/api/staticmap?center= ${ widget . patientAppointmentHistoryResponseModel . latitude } , ${ widget . patientAppointmentHistoryResponseModel . longitude } &zoom=14&size= ${ ( MediaQuery . of ( context ) . size . width * 1.5 ) . toInt ( ) } x ${ ( MediaQuery . of ( context ) . size . height * 0.35 ) . toInt ( ) } &maptype=roadmap&markers=color:red%7C ${ widget . patientAppointmentHistoryResponseModel . latitude } , ${ widget . patientAppointmentHistoryResponseModel . longitude } &key= ${ ApiKeyConstants . googleMapsApiKey } " ,
" https://maps.googleapis.com/maps/api/staticmap?center= ${ widget . patientAppointmentHistoryResponseModel . latitude } , ${ widget . patientAppointmentHistoryResponseModel . longitude } &zoom=14&size= ${ ( MediaQuery . of ( context ) . size . width * 1.5 ) . toInt ( ) } x ${ ( MediaQuery . of ( context ) . size . height * 0.35 ) . toInt ( ) } &maptype=roadmap&markers=color:red%7C ${ widget . patientAppointmentHistoryResponseModel . latitude } , ${ widget . patientAppointmentHistoryResponseModel . longitude } &key= ${ ApiKeyConstants . googleMapsApiKey } " ,
fit: BoxFit . contain ,
fit: BoxFit . cover ,
width: double . infinity ,
) ,
) ,
) ,
) ,
) ,
Positioned (
Positioned (
@ -663,7 +685,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
width: MediaQuery . of ( context ) . size . width - 85. w ,
width: MediaQuery . of ( context ) . size . width - 85. w ,
child: CustomButton (
child: CustomButton (
onPressed: ( ) async {
onPressed: ( ) async {
if ( widget . patientAppointmentHistoryResponseModel . projectID = = 130 | | widget . patientAppointmentHistoryResponseModel . projectID = = 120 ) {
if ( widget . patientAppointmentHistoryResponseModel . projectID = = 130 | |
widget . patientAppointmentHistoryResponseModel . projectID = = 120 ) {
showDirectionsBottomSheet ( ) ;
showDirectionsBottomSheet ( ) ;
} else {
} else {
await MapLauncher . showMarker (
await MapLauncher . showMarker (
@ -683,7 +706,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
} ,
} ,
text: LocaleKeys . getDirections . tr ( context: context ) ,
text: LocaleKeys . getDirections . tr ( context: context ) ,
backgroundColor: AppColors . bookAppointment . withValues ( alpha: 0.8 ) ,
backgroundColor: AppColors . bookAppointment . withValues ( alpha: 0.8 ) ,
borderColor: AppointmentType . getNextActionButtonColor ( widget . patientAppointmentHistoryResponseModel . nextAction ) . withValues ( alpha: 0.01 ) ,
borderColor: AppointmentType . getNextActionButtonColor (
widget . patientAppointmentHistoryResponseModel . nextAction )
. withValues ( alpha: 0.01 ) ,
textColor: Colors . white ,
textColor: Colors . white ,
fontSize: 14. f ,
fontSize: 14. f ,
fontWeight: FontWeight . w600 ,
fontWeight: FontWeight . w600 ,
@ -974,7 +999,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
) ;
) ;
Navigator . of ( context ) . push (
Navigator . of ( context ) . push (
CustomPageRoute (
CustomPageRoute (
page: PrescriptionDetailPage ( isFromAppointments: true , prescriptionsResponseModel: patientPrescriptionsResponseModel ) ,
page: PrescriptionDetailPage (
isFromAppointments: true , prescriptionsResponseModel: patientPrescriptionsResponseModel ) ,
) ,
) ,
) ;
) ;
} else {
} else {
@ -1289,7 +1315,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
if ( widget . patientAppointmentHistoryResponseModel . nextAction = = 15 | | widget . patientAppointmentHistoryResponseModel . nextAction = = 20 )
if ( widget . patientAppointmentHistoryResponseModel . nextAction = = 15 | |
widget . patientAppointmentHistoryResponseModel . nextAction = = 20 )
Column (
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
@ -1297,7 +1324,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
children: [
LocaleKeys . amountBeforeTax . tr ( context: context ) . toText18 ( isBold: true ) ,
LocaleKeys . amountBeforeTax . tr ( context: context ) . toText18 ( isBold: true ) ,
Utils . getPaymentAmountWithSymbol ( widget . patientAppointmentHistoryResponseModel . patientShare ! . toString ( ) . toText16 ( isBold: true ) , AppColors . blackColor , 13 ,
Utils . getPaymentAmountWithSymbol (
widget . patientAppointmentHistoryResponseModel . patientShare ! . toString ( ) . toText16 ( isBold: true ) ,
AppColors . blackColor ,
13 ,
isSaudiCurrency: true ) ,
isSaudiCurrency: true ) ,
] ,
] ,
) ,
) ,
@ -1305,8 +1335,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Row (
Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
children: [
Expanded ( child: LocaleKeys . upcomingPaymentNow . tr ( context: context ) . toText12 ( isBold: true , color: AppColors . greyTextColor ) ) ,
Expanded (
" VAT 15%( ${ widget . patientAppointmentHistoryResponseModel . patientTaxAmount } ) " . toText14 ( isBold: true , color: AppColors . greyTextColor , letterSpacing: - 0.64 ) ,
child: LocaleKeys . upcomingPaymentNow . tr ( context: context ) . toText12 ( isBold: true , color: AppColors . greyTextColor ) ) ,
" VAT 15%( ${ widget . patientAppointmentHistoryResponseModel . patientTaxAmount } ) "
. toText14 ( isBold: true , color: AppColors . greyTextColor , letterSpacing: - 0.64 ) ,
] ,
] ,
) ,
) ,
SizedBox ( height: 18. h ) ,
SizedBox ( height: 18. h ) ,
@ -1320,7 +1352,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Row (
Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
children: [
Utils . getPaymentAmountWithSymbol ( widget . patientAppointmentHistoryResponseModel . patientShareWithTax ! . toString ( ) . toText24 ( isBold: true ) , AppColors . blackColor , 17 ,
Utils . getPaymentAmountWithSymbol (
widget . patientAppointmentHistoryResponseModel . patientShareWithTax ! . toString ( ) . toText24 ( isBold: true ) ,
AppColors . blackColor ,
17 ,
isSaudiCurrency: true ) ,
isSaudiCurrency: true ) ,
] ,
] ,
) ,
) ,
@ -1358,7 +1393,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
handleAppointmentNextAction ( widget . patientAppointmentHistoryResponseModel . nextAction ) ;
handleAppointmentNextAction ( widget . patientAppointmentHistoryResponseModel . nextAction ) ;
} ,
} ,
backgroundColor: AppointmentType . getNextActionButtonColor ( widget . patientAppointmentHistoryResponseModel . nextAction ) ,
backgroundColor: AppointmentType . getNextActionButtonColor ( widget . patientAppointmentHistoryResponseModel . nextAction ) ,
borderColor: AppointmentType . getNextActionButtonColor ( widget . patientAppointmentHistoryResponseModel . nextAction ) . withValues ( alpha: 0.01 ) ,
borderColor: AppointmentType . getNextActionButtonColor ( widget . patientAppointmentHistoryResponseModel . nextAction )
. withValues ( alpha: 0.01 ) ,
textColor: widget . patientAppointmentHistoryResponseModel . nextAction = = 15 ? AppColors . textColor : Colors . white ,
textColor: widget . patientAppointmentHistoryResponseModel . nextAction = = 15 ? AppColors . textColor : Colors . white ,
fontSize: 16. f ,
fontSize: 16. f ,
fontWeight: FontWeight . w600 ,
fontWeight: FontWeight . w600 ,
@ -1398,7 +1434,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
text: LocaleKeys . insideHospital . tr ( context: context ) ,
text: LocaleKeys . insideHospital . tr ( context: context ) ,
onPressed: ( ) {
onPressed: ( ) {
Navigator . pop ( context ) ;
Navigator . pop ( context ) ;
initPenguinSDK ( widget . patientAppointmentHistoryResponseModel . projectID = = 130 ? 1 : ( widget . patientAppointmentHistoryResponseModel . projectID = = 120 ? 3 : - 1 ) ,
initPenguinSDK (
widget . patientAppointmentHistoryResponseModel . projectID = = 130
? 1
: ( widget . patientAppointmentHistoryResponseModel . projectID = = 120 ? 3 : - 1 ) ,
clinicID: widget . patientAppointmentHistoryResponseModel . clinicID . toString ( ) ) ;
clinicID: widget . patientAppointmentHistoryResponseModel . clinicID . toString ( ) ) ;
} ,
} ,
backgroundColor: AppColors . primaryRedColor ,
backgroundColor: AppColors . primaryRedColor ,
@ -1417,12 +1456,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Navigator . pop ( context ) ;
Navigator . pop ( context ) ;
await MapLauncher . showMarker (
await MapLauncher . showMarker (
mapType: MapType . google ,
mapType: MapType . google ,
coords: Coords ( double . parse ( widget . patientAppointmentHistoryResponseModel . latitude ! ) , double . parse ( widget . patientAppointmentHistoryResponseModel . longitude ! ) ) ,
coords: Coords ( double . parse ( widget . patientAppointmentHistoryResponseModel . latitude ! ) ,
double . parse ( widget . patientAppointmentHistoryResponseModel . longitude ! ) ) ,
title: widget . patientAppointmentHistoryResponseModel . projectName ? ? " Habib Hospital " ,
title: widget . patientAppointmentHistoryResponseModel . projectName ? ? " Habib Hospital " ,
) . catchError ( ( err ) {
) . catchError ( ( err ) {
MapLauncher . showMarker (
MapLauncher . showMarker (
mapType: Platform . isIOS ? MapType . apple : MapType . google ,
mapType: Platform . isIOS ? MapType . apple : MapType . google ,
coords: Coords ( double . parse ( widget . patientAppointmentHistoryResponseModel . latitude ! ) , double . parse ( widget . patientAppointmentHistoryResponseModel . longitude ! ) ) ,
coords: Coords ( double . parse ( widget . patientAppointmentHistoryResponseModel . latitude ! ) ,
double . parse ( widget . patientAppointmentHistoryResponseModel . longitude ! ) ) ,
title: widget . patientAppointmentHistoryResponseModel . projectName ? ? " Habib Hospital " ,
title: widget . patientAppointmentHistoryResponseModel . projectName ? ? " Habib Hospital " ,
) ;
) ;
} ) ;
} ) ;
@ -1456,7 +1497,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Permission . bluetoothScan ,
Permission . bluetoothScan ,
Permission . activityRecognition ,
Permission . activityRecognition ,
] . request ( ) . whenComplete ( ( ) {
] . request ( ) . whenComplete ( ( ) {
PenguinMethodChannel ( ) . launch ( " penguin " , getIt . get < AppState > ( ) . isArabic ( ) ? " ar " : " en " , getIt . get < AppState > ( ) . getAuthenticatedUser ( ) ? . patientId ? . toString ( ) ? ? " " , true , details: data ) ;
PenguinMethodChannel ( ) . launch ( " penguin " , getIt . get < AppState > ( ) . isArabic ( ) ? " ar " : " en " ,
getIt . get < AppState > ( ) . getAuthenticatedUser ( ) ? . patientId ? . toString ( ) ? ? " " , true ,
details: data ) ;
} ) ;
} ) ;
}
}
}
}
@ -1514,12 +1557,20 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
LoaderBottomSheet . hideLoader ( ) ;
LoaderBottomSheet . hideLoader ( ) ;
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
showCommonBottomSheet ( context , child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentConfirmedSuccessfully . tr ( context: context ) ) , callBackFunc: ( str ) {
showCommonBottomSheet ( context ,
child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentConfirmedSuccessfully . tr ( context: context ) ) , callBackFunc: ( str ) {
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . initAppointmentsViewModel ( ) ;
myAppointmentsViewModel . initAppointmentsViewModel ( ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
Navigator . of ( context ) . pop ( ) ;
Navigator . of ( context ) . pop ( ) ;
} , title: " " , height: ResponsiveExtension . screenHeight * 0.3 , isAutoDismiss: true , isCloseButtonVisible: true , isDismissible: false , isFullScreen: false , isSuccessDialog: true ) ;
} ,
title: " " ,
height: ResponsiveExtension . screenHeight * 0.3 ,
isAutoDismiss: true ,
isCloseButtonVisible: true ,
isDismissible: false ,
isFullScreen: false ,
isSuccessDialog: true ) ;
} ) ;
} ) ;
/ / LoaderBottomSheet . hideLoader ( ) ;
/ / LoaderBottomSheet . hideLoader ( ) ;
case 15 :
case 15 :
@ -1539,7 +1590,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
return Column (
return Column (
crossAxisAlignment: CrossAxisAlignment . center ,
crossAxisAlignment: CrossAxisAlignment . center ,
children: [
children: [
Lottie . asset ( AppAnimations . warningAnimation , repeat: false , reverse: false , frameRate: FrameRate ( 60 ) , width: 100. h , height: 100. h , fit: BoxFit . fill ) ,
Lottie . asset ( AppAnimations . warningAnimation ,
repeat: false , reverse: false , frameRate: FrameRate ( 60 ) , width: 100. h , height: 100. h , fit: BoxFit . fill ) ,
SizedBox (
SizedBox (
height: 12 ,
height: 12 ,
) ,
) ,