|  |  | @ -8,19 +8,26 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/core/utils/utils.dart'; |  |  |  | import 'package:hmg_patient_app_new/core/utils/utils.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; |  |  |  | import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; |  |  |  | import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/appointemnet_filters.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; |  |  |  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:hmg_patient_app_new/presentation/appointments/widgets/AppointmentFilter.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart'; |  |  |  | import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart'; |  |  |  | import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:hmg_patient_app_new/widgets/date_range_selector/date_range_calender.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/theme/colors.dart'; |  |  |  | import 'package:hmg_patient_app_new/theme/colors.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:provider/provider.dart'; |  |  |  | import 'package:provider/provider.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import '../../widgets/common_bottom_sheet.dart' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     show showCommonBottomSheetWithoutHeight; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | class MyAppointmentsPage extends StatefulWidget { |  |  |  | class MyAppointmentsPage extends StatefulWidget { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const MyAppointmentsPage({super.key}); |  |  |  |   const MyAppointmentsPage({super.key}); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -61,6 +68,8 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 ], |  |  |  |                 ], | 
			
		
	
		
		
			
				
					
					|  |  |  |                 onTabChange: (index) { |  |  |  |                 onTabChange: (index) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                   myAppointmentsViewModel.onTabChange(index); |  |  |  |                   myAppointmentsViewModel.onTabChange(index); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   myAppointmentsViewModel.updateListWRTTab(index); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   context.read<DateRangeSelectorRangeViewModel>().flush(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }, |  |  |  |                 }, | 
			
		
	
		
		
			
				
					
					|  |  |  |               ).paddingSymmetrical(24.h, 0.h), |  |  |  |               ).paddingSymmetrical(24.h, 0.h), | 
			
		
	
		
		
			
				
					
					|  |  |  |               Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) { |  |  |  |               Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -74,218 +83,147 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> { | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Widget getSelectedTabData(int index, MyAppointmentsViewModel myAppointmentsVM) { |  |  |  |   Widget getSelectedTabData(int index, MyAppointmentsViewModel myAppointmentsVM) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     switch (index) { |  |  |  |     return getAppointList( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       case 0: |  |  |  |         myAppointmentsVM, myAppointmentsVM.filteredAppointmentList); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         //All Appointments Tab Data |  |  |  |   } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         return Column( |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           crossAxisAlignment: CrossAxisAlignment.start, |  |  |  |   Widget getAppointList(MyAppointmentsViewModel myAppointmentsVM, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           children: [ |  |  |  |       List<PatientAppointmentHistoryResponseModel> filteredAppointmentList) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             // Expandable list |  |  |  |     return Column( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             ListView.separated( |  |  |  |       crossAxisAlignment: CrossAxisAlignment.start, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               padding: EdgeInsets.only(top: 24.h), |  |  |  |       children: [ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               shrinkWrap: true, |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               physics: NeverScrollableScrollPhysics(), |  |  |  |         Visibility( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               itemCount: myAppointmentsVM.isMyAppointmentsLoading |  |  |  |           visible: myAppointmentsVM.availableFilters.isNotEmpty, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                   ? 5 |  |  |  |             child: getAppointmentFilters(myAppointmentsVM)), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                   : myAppointmentsVM.patientAppointmentsHistoryList.isNotEmpty |  |  |  |         ListView.separated( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                       ? myAppointmentsVM.patientAppointmentsHistoryList.length |  |  |  |           padding: EdgeInsets.only(top: 24.h), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                       : 1, |  |  |  |           shrinkWrap: true, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               itemBuilder: (context, index) { |  |  |  |           physics: NeverScrollableScrollPhysics(), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 return myAppointmentsVM.isMyAppointmentsLoading |  |  |  |           itemCount: myAppointmentsVM.isMyAppointmentsLoading | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     ? Container( |  |  |  |               ? 5 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), |  |  |  |               : filteredAppointmentList.isNotEmpty | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         child: AppointmentCard( |  |  |  |                   ? filteredAppointmentList.length | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(), |  |  |  |                   : 1, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           myAppointmentsViewModel: myAppointmentsViewModel, |  |  |  |           itemBuilder: (context, index) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           isLoading: true, |  |  |  |             return myAppointmentsVM.isMyAppointmentsLoading | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           isFromHomePage: false, |  |  |  |                 ? Container( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         ), |  |  |  |                     decoration: RoundedRectangleBorder() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                       ).paddingSymmetrical(24.h, 0.h) |  |  |  |                         .toSmoothCornerDecoration( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     : myAppointmentsVM.patientAppointmentsHistoryList.isNotEmpty |  |  |  |                             color: AppColors.whiteColor, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         ? AnimationConfiguration.staggeredList( |  |  |  |                             borderRadius: 24.h, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             position: index, |  |  |  |                             hasShadow: true), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             duration: const Duration(milliseconds: 500), |  |  |  |                     child: AppointmentCard( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             child: SlideAnimation( |  |  |  |                       patientAppointmentHistoryResponseModel: | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               verticalOffset: 100.0, |  |  |  |                           PatientAppointmentHistoryResponseModel(), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               child: FadeInAnimation( |  |  |  |                       myAppointmentsViewModel: myAppointmentsViewModel, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 child: AnimatedContainer( |  |  |  |                       isLoading: true, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   duration: Duration(milliseconds: 300), |  |  |  |                       isFromHomePage: false, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   curve: Curves.easeInOut, |  |  |  |                     ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), |  |  |  |                   ).paddingSymmetrical(24.h, 0.h) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   child: AppointmentCard( |  |  |  |                 : filteredAppointmentList.isNotEmpty | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList[index], |  |  |  |                     ? AnimationConfiguration.staggeredList( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     myAppointmentsViewModel: myAppointmentsViewModel, |  |  |  |                         position: index, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     isLoading: false, |  |  |  |                         duration: const Duration(milliseconds: 500), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     isFromHomePage: false, |  |  |  |                         child: SlideAnimation( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   ), |  |  |  |                           verticalOffset: 100.0, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 ).paddingSymmetrical(24.h, 0.h), |  |  |  |                           child: FadeInAnimation( | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             child: AnimatedContainer( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                               duration: Duration(milliseconds: 300), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                               curve: Curves.easeInOut, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                               decoration: RoundedRectangleBorder() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                   .toSmoothCornerDecoration( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                       color: AppColors.whiteColor, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                       borderRadius: 24.h, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                       hasShadow: true), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                               child: AppointmentCard( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 patientAppointmentHistoryResponseModel: | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     filteredAppointmentList[index], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 myAppointmentsViewModel: | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     myAppointmentsViewModel, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 isLoading: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 isFromHomePage: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |                               ), |  |  |  |                               ), | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ), |  |  |  |                             ).paddingSymmetrical(24.h, 0.h), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           ) |  |  |  |                           ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         : Utils.getNoDataWidget( |  |  |  |                         ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             context, |  |  |  |                       ) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             noDataText: "You don't have any appointments yet.".needTranslation, |  |  |  |                     : Utils.getNoDataWidget( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             callToActionButton: CustomButton( |  |  |  |                         context, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               text: LocaleKeys.bookAppo.tr(context: context), |  |  |  |                         noDataText: "You don't have any appointments yet." | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               onPressed: () { |  |  |  |                             .needTranslation, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 Navigator.of(context).push( |  |  |  |                         callToActionButton: CustomButton( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   CustomPageRoute( |  |  |  |                           text: LocaleKeys.bookAppo.tr(context: context), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     page: BookAppointmentPage(), |  |  |  |                           onPressed: () { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   ), |  |  |  |                             Navigator.of(context).push( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 ); |  |  |  |                               CustomPageRoute( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               }, |  |  |  |                                 page: BookAppointmentPage(), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               backgroundColor: Color(0xffFEE9EA), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               borderColor: Color(0xffFEE9EA), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               textColor: Color(0xffED1C2B), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               fontSize: 14, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               fontWeight: FontWeight.w500, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               borderRadius: 12, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               padding: EdgeInsets.fromLTRB(10, 0, 10, 0), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               height: 40, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               icon: AppAssets.add_icon, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               iconColor: AppColors.primaryRedColor, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ).paddingSymmetrical(48.h, 0.h), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                           ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             ), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           ], |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       case 1: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         //Upcoming Appointments Tab Data |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         return Column( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           crossAxisAlignment: CrossAxisAlignment.start, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           children: [ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             // Expandable list |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             ListView.separated( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               shrinkWrap: true, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               physics: NeverScrollableScrollPhysics(), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               itemCount: myAppointmentsVM.isMyAppointmentsLoading |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   ? 5 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   : myAppointmentsVM.patientUpcomingAppointmentsHistoryList.isNotEmpty |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       ? myAppointmentsVM.patientUpcomingAppointmentsHistoryList.length |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       : 1, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               itemBuilder: (context, index) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return myAppointmentsVM.isMyAppointmentsLoading |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ? const MoviesShimmerWidget().paddingSymmetrical(24.h, 0.h) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     : myAppointmentsVM.patientUpcomingAppointmentsHistoryList.isNotEmpty |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                         ? AnimationConfiguration.staggeredList( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             position: index, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             duration: const Duration(milliseconds: 500), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             child: SlideAnimation( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               verticalOffset: 100.0, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               child: FadeInAnimation( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 child: AnimatedContainer( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   duration: Duration(milliseconds: 300), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   curve: Curves.easeInOut, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   margin: EdgeInsets.symmetric(vertical: 8.h), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   child: AppointmentCard( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     patientAppointmentHistoryResponseModel: myAppointmentsVM.patientUpcomingAppointmentsHistoryList[index], |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     myAppointmentsViewModel: myAppointmentsViewModel, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   ), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 ).paddingSymmetrical(24.h, 0.h), |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                               ), |  |  |  |                               ), | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ), |  |  |  |                             ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           ) |  |  |  |                           }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         : Utils.getNoDataWidget( |  |  |  |                           backgroundColor: Color(0xffFEE9EA), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             context, |  |  |  |                           borderColor: Color(0xffFEE9EA), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             noDataText: "You don't have any appointments yet.".needTranslation, |  |  |  |                           textColor: Color(0xffED1C2B), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             callToActionButton: CustomButton( |  |  |  |                           fontSize: 14, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               text: LocaleKeys.bookAppo.tr(context: context), |  |  |  |                           fontWeight: FontWeight.w500, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               onPressed: () { |  |  |  |                           borderRadius: 12, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 Navigator.of(context).push( |  |  |  |                           padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   CustomPageRoute( |  |  |  |                           height: 40, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     page: BookAppointmentPage(), |  |  |  |                           icon: AppAssets.add_icon, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   ), |  |  |  |                           iconColor: AppColors.primaryRedColor, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 ); |  |  |  |                         ).paddingSymmetrical(48.h, 0.h), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               }, |  |  |  |                       ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               backgroundColor: Color(0xffFEE9EA), |  |  |  |           }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               borderColor: Color(0xffFEE9EA), |  |  |  |           separatorBuilder: (BuildContext cxt, int index) => | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               textColor: Color(0xffED1C2B), |  |  |  |               SizedBox(height: 16.h), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               fontSize: 14, |  |  |  |         ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               fontWeight: FontWeight.w500, |  |  |  |       ], | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               borderRadius: 12, |  |  |  |     ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               padding: EdgeInsets.fromLTRB(10, 0, 10, 0), |  |  |  |   } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               height: 40, |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               icon: AppAssets.add_icon, |  |  |  |   Widget getAppointmentFilters(MyAppointmentsViewModel myAppointmentsVM) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               iconColor: AppColors.primaryRedColor, |  |  |  |     return SizedBox( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             ).paddingSymmetrical(48.h, 0.h), |  |  |  |         height: 56.h, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           ); |  |  |  |         child: Row( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             ), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           ], |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       case 2: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         //Completed Appointments Tab Data |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         return Column( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           crossAxisAlignment: CrossAxisAlignment.start, |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           children: [ |  |  |  |           children: [ | 
			
		
	
		
		
			
				
					
					|  |  |  |             // Expandable list |  |  |  |             Expanded( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             ListView.separated( |  |  |  |               child: ListView.separated( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               shrinkWrap: true, |  |  |  |                   separatorBuilder: (_, index) => SizedBox( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               physics: NeverScrollableScrollPhysics(), |  |  |  |                         width: 8.h, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               itemCount: myAppointmentsVM.isMyAppointmentsLoading |  |  |  |                       ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                   ? 5 |  |  |  |                   scrollDirection: Axis.horizontal, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                   : myAppointmentsVM.patientArrivedAppointmentsHistoryList.isNotEmpty |  |  |  |                   itemCount: myAppointmentsVM.availableFilters.length, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                       ? myAppointmentsVM.patientArrivedAppointmentsHistoryList.length |  |  |  |                   itemBuilder: (_, index) => AppointmentFilters( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                       : 1, |  |  |  |                         selectedFilter: myAppointmentsVM.selectedFilter, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               itemBuilder: (context, index) { |  |  |  |                         item: myAppointmentsVM.availableFilters[index], | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 return myAppointmentsVM.isMyAppointmentsLoading |  |  |  |                         onClicked: () { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     ? const MoviesShimmerWidget().paddingSymmetrical(24.h, 0.h) |  |  |  |                           if (myAppointmentsVM.availableFilters[index] == | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     : myAppointmentsVM.patientArrivedAppointmentsHistoryList.isNotEmpty |  |  |  |                               AppointmentListingFilters.DATESELECTION) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         ? AnimationConfiguration.staggeredList( |  |  |  |                             showCommonBottomSheetWithoutHeight( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             position: index, |  |  |  |                               title: "Set The Date Range".needTranslation, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             duration: const Duration(milliseconds: 500), |  |  |  |                               context, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             child: SlideAnimation( |  |  |  |                               child: DateRangeSelector( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               verticalOffset: 100.0, |  |  |  |                                 onRangeSelected: (start, end) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               child: FadeInAnimation( |  |  |  |                                   // if (start != null) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 child: AnimatedContainer( |  |  |  |                                   myAppointmentsVM.getSelectedDateRange( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   duration: Duration(milliseconds: 300), |  |  |  |                                       start, end); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   curve: Curves.easeInOut, |  |  |  |                                   // } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   margin: EdgeInsets.symmetric(vertical: 8.h), |  |  |  |                                 }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   child: AppointmentCard( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     patientAppointmentHistoryResponseModel: myAppointmentsVM.patientArrivedAppointmentsHistoryList[index], |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     myAppointmentsViewModel: myAppointmentsViewModel, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                   ), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 ).paddingSymmetrical(24.h, 0.h), |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                               ), |  |  |  |                               ), | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ), |  |  |  |                               isFullScreen: false, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                           ) |  |  |  |                               isCloseButtonVisible: true, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         : Utils.getNoDataWidget( |  |  |  |                               callBackFunc: () {}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             context, |  |  |  |                             ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             noDataText: "You don't have any appointments yet.".needTranslation, |  |  |  |                           } else { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             callToActionButton: CustomButton( |  |  |  |                             myAppointmentsVM.setSelectedFilter( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               text: LocaleKeys.bookAppo.tr(context: context), |  |  |  |                                 myAppointmentsVM.availableFilters[index]); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                               onPressed: () { |  |  |  |                             myAppointmentsVM.filterTheListAsPerSelection(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 Navigator.of(context).push( |  |  |  |                           } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   CustomPageRoute( |  |  |  |                         }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     page: BookAppointmentPage(), |  |  |  |                       )), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                   ), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               backgroundColor: Color(0xffFEE9EA), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               borderColor: Color(0xffFEE9EA), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               textColor: Color(0xffED1C2B), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               fontSize: 14, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               fontWeight: FontWeight.w500, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               borderRadius: 12, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               padding: EdgeInsets.fromLTRB(10, 0, 10, 0), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               height: 40, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               icon: AppAssets.add_icon, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                               iconColor: AppColors.primaryRedColor, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ).paddingSymmetrical(48.h, 0.h), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                           ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             ), |  |  |  |             ), | 
			
		
	
		
		
			
				
					
					|  |  |  |           ], |  |  |  |           ], | 
			
		
	
		
		
			
				
					
					|  |  |  |         ); |  |  |  |         )).paddingOnly(top: 24.h, left: 24.h, right: 24.h); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       default: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         return Container(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |