|
|
|
|
@ -21,11 +21,13 @@ import 'package:hmg_patient_app_new/features/authentication/authentication_view_
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_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/notifications/notifications_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
@ -44,6 +46,7 @@ import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/notifications/notifications_list_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/profile_settings/profile_settings.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/rate_appointment/rate_appointment_doctor.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedures_details_page.dart';
|
|
|
|
|
@ -61,6 +64,8 @@ import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../active_medication/active_medication_page.dart';
|
|
|
|
|
|
|
|
|
|
import '../emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart';
|
|
|
|
|
|
|
|
|
|
class LandingPage extends StatefulWidget {
|
|
|
|
|
const LandingPage({super.key});
|
|
|
|
|
|
|
|
|
|
@ -82,6 +87,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
late BookAppointmentsViewModel bookAppointmentsViewModel;
|
|
|
|
|
late EmergencyServicesViewModel emergencyServicesViewModel;
|
|
|
|
|
late TodoSectionViewModel todoSectionViewModel;
|
|
|
|
|
late NotificationsViewModel notificationsViewModel;
|
|
|
|
|
|
|
|
|
|
final SwiperController _controller = SwiperController();
|
|
|
|
|
|
|
|
|
|
@ -108,22 +114,26 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
|
emergencyServicesViewModel.checkPatientERAdvanceBalance();
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointmentQueueDetails();
|
|
|
|
|
if(!appState.isRatedVisible) {
|
|
|
|
|
appointmentRatingViewModel.getLastRatingAppointment(onSuccess: (response) {
|
|
|
|
|
if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
|
|
|
|
|
appointmentRatingViewModel.getAppointmentDetails(appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!, appointmentRatingViewModel.appointmentRatedList.last.projectID!,
|
|
|
|
|
onSuccess: ((response) {
|
|
|
|
|
appointmentRatingViewModel.setClinicOrDoctor(false);
|
|
|
|
|
appointmentRatingViewModel.setTitle("Rate Doctor".needTranslation);
|
|
|
|
|
appointmentRatingViewModel.setSubTitle("How was your last visit with doctor?".needTranslation);
|
|
|
|
|
openLastRating();
|
|
|
|
|
appState.setRatedVisible(true);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
notificationsViewModel.initNotificationsViewModel();
|
|
|
|
|
|
|
|
|
|
// Commented as per new requirement to remove rating popup from the app
|
|
|
|
|
|
|
|
|
|
// if(!appState.isRatedVisible) {
|
|
|
|
|
// appointmentRatingViewModel.getLastRatingAppointment(onSuccess: (response) {
|
|
|
|
|
// if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
|
|
|
|
|
// appointmentRatingViewModel.getAppointmentDetails(appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!, appointmentRatingViewModel.appointmentRatedList.last.projectID!,
|
|
|
|
|
// onSuccess: ((response) {
|
|
|
|
|
// appointmentRatingViewModel.setClinicOrDoctor(false);
|
|
|
|
|
// appointmentRatingViewModel.setTitle("Rate Doctor".needTranslation);
|
|
|
|
|
// appointmentRatingViewModel.setSubTitle("How was your last visit with doctor?".needTranslation);
|
|
|
|
|
// openLastRating();
|
|
|
|
|
// appState.setRatedVisible(true);
|
|
|
|
|
// }),
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
super.initState();
|
|
|
|
|
@ -137,6 +147,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
immediateLiveCareViewModel = Provider.of<ImmediateLiveCareViewModel>(context, listen: false);
|
|
|
|
|
emergencyServicesViewModel = Provider.of<EmergencyServicesViewModel>(context, listen: false);
|
|
|
|
|
todoSectionViewModel = Provider.of<TodoSectionViewModel>(context, listen: false);
|
|
|
|
|
notificationsViewModel = Provider.of<NotificationsViewModel>(context, listen: false);
|
|
|
|
|
appState = getIt.get<AppState>();
|
|
|
|
|
return PopScope(
|
|
|
|
|
canPop: false,
|
|
|
|
|
@ -182,37 +193,65 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
|
|
|
|
|
height: 40.h,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
spacing: 12.h,
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 18.h, width: 18.h).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: MedicalFilePage(),
|
|
|
|
|
// page: LoginScreen(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 18.h, width: 18.h).onPress(() {
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// CustomPageRoute(
|
|
|
|
|
// page: MedicalFilePage(),
|
|
|
|
|
// // page: LoginScreen(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
}),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 18.h, width: 18.h).onPress(() {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
title: LocaleKeys.contactUs.tr(),
|
|
|
|
|
child: ContactUs(),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Consumer<TodoSectionViewModel>(builder: (context, todoSectionVM, child) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
spacing: 12.h,
|
|
|
|
|
children: [
|
|
|
|
|
Stack(children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 18.h, width: 18.h).onPress(() async {
|
|
|
|
|
if (appState.isAuthenticated) {
|
|
|
|
|
notificationsViewModel.setNotificationStatusID(2);
|
|
|
|
|
notificationsViewModel.getAllNotifications();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: NotificationsListPage(),
|
|
|
|
|
// page: LoginScreen(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
await authVM.onLoginPressed();
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
(appState.isAuthenticated && (int.parse(todoSectionVM.notificationsCount ?? "0") > 0))
|
|
|
|
|
? Positioned(
|
|
|
|
|
right: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 8.w,
|
|
|
|
|
height: 8.h,
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: AppColors.primaryRedColor,
|
|
|
|
|
borderRadius: BorderRadius.circular(20.r),
|
|
|
|
|
),
|
|
|
|
|
child: Text(
|
|
|
|
|
"",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 8.f,
|
|
|
|
|
),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
|
]),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 18.h, width: 18.h).onPress(() {
|
|
|
|
|
openIndoorNavigationBottomSheet(context);
|
|
|
|
|
}),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 18.h, width: 18.h).onPress(() {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
title: LocaleKeys.contactUs.tr(),
|
|
|
|
|
child: ContactUs(),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
!appState.isAuthenticated
|
|
|
|
|
@ -312,15 +351,49 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h)
|
|
|
|
|
: Swiper(
|
|
|
|
|
itemCount: myAppointmentsVM.isMyAppointmentsLoading
|
|
|
|
|
? 3
|
|
|
|
|
: myAppointmentsVM.patientAppointmentsHistoryList.length < 3
|
|
|
|
|
? myAppointmentsVM.patientAppointmentsHistoryList.length
|
|
|
|
|
: 3,
|
|
|
|
|
layout: SwiperLayout.STACK,
|
|
|
|
|
loop: true,
|
|
|
|
|
itemWidth: MediaQuery.of(context).size.width - 48.h,
|
|
|
|
|
: isTablet
|
|
|
|
|
? SizedBox(
|
|
|
|
|
height: isFoldable ? 290.h : 255.h,
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: 3,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(left: 16.h, right: 16.h),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return SizedBox(
|
|
|
|
|
height: 255.h,
|
|
|
|
|
width: 250.w,
|
|
|
|
|
child: getIndexSwiperCard(index),
|
|
|
|
|
);
|
|
|
|
|
// return AnimationConfiguration.staggeredList(
|
|
|
|
|
// position: index,
|
|
|
|
|
// duration: const Duration(milliseconds: 1000),
|
|
|
|
|
// child: SlideAnimation(
|
|
|
|
|
// horizontalOffset: 100.0,
|
|
|
|
|
// child: FadeInAnimation(
|
|
|
|
|
// child: SizedBox(
|
|
|
|
|
// height: 255.h,
|
|
|
|
|
// width: 250.w,
|
|
|
|
|
// child: getIndexSwiperCard(index),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(
|
|
|
|
|
width: 10.w,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Swiper(
|
|
|
|
|
itemCount: myAppointmentsVM.isMyAppointmentsLoading
|
|
|
|
|
? 3
|
|
|
|
|
: myAppointmentsVM.patientAppointmentsHistoryList.length < 3
|
|
|
|
|
? myAppointmentsVM.patientAppointmentsHistoryList.length
|
|
|
|
|
: 3,
|
|
|
|
|
layout: SwiperLayout.STACK,
|
|
|
|
|
loop: true,
|
|
|
|
|
itemWidth: MediaQuery.of(context).size.width - 48.h,
|
|
|
|
|
indicatorLayout: PageIndicatorLayout.COLOR,
|
|
|
|
|
axisDirection: AxisDirection.right,
|
|
|
|
|
controller: _controller,
|
|
|
|
|
@ -331,208 +404,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor),
|
|
|
|
|
),
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return (myAppointmentsVM.isPatientHasQueueAppointment && index == 0)
|
|
|
|
|
? Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 20.h,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
side: BorderSide(color: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus), width: 2.w),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: myAppointmentsVM.currentQueueStatus == 0 ? "In Queue".needTranslation : "Your Turn".needTranslation,
|
|
|
|
|
backgroundColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.20),
|
|
|
|
|
textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus),
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 2.h),
|
|
|
|
|
"Thank you for your patience, here is your queue number."
|
|
|
|
|
.needTranslation
|
|
|
|
|
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
myAppointmentsVM.currentPatientQueueDetails.queueNo!.toText28(isBold: true),
|
|
|
|
|
SizedBox(height: 6.h),
|
|
|
|
|
myAppointmentsVM.patientQueueDetailsList.isNotEmpty ? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
"Serving Now: ".needTranslation.toText14(isBold: true),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
myAppointmentsVM.patientQueueDetailsList.first.queueNo!.toText12(isBold: true),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
deleteIcon: myAppointmentsVM.patientQueueDetailsList.first.callType == 1 ? AppAssets.call_for_vitals : AppAssets.call_for_doctor,
|
|
|
|
|
labelText: myAppointmentsVM.patientQueueDetailsList.first.callType == 1 ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation,
|
|
|
|
|
iconColor: myAppointmentsVM.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
textColor: myAppointmentsVM.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
iconSize: 14.w,
|
|
|
|
|
backgroundColor: myAppointmentsVM.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor.withValues(alpha: 0.1) : AppColors.successColor.withValues(alpha: 0.1),
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 8.h, end: -2.h),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
) : SizedBox(height: 12.h),
|
|
|
|
|
SizedBox(height: 5.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: Utils.getCardButtonText(myAppointmentsVM.currentQueueStatus, myAppointmentsVM.currentPatientQueueDetails.roomNo ?? ""),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: Utils.getCardButtonColor(myAppointmentsVM.currentQueueStatus),
|
|
|
|
|
borderColor: Utils.getCardButtonColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.01),
|
|
|
|
|
textColor: Utils.getCardButtonTextColor(myAppointmentsVM.currentQueueStatus),
|
|
|
|
|
fontSize: 12.f,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
height: 40.h,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 18.h,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: AppointmentQueuePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
: (immediateLiveCareVM.patientHasPendingLiveCareRequest && index == 0)
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 20.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Immediate LiveCare Request".needTranslation.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: immediateLiveCareVM.patientLiveCareHistoryList[0].stringCallStatus,
|
|
|
|
|
backgroundColor: AppColors.warningColorYellow.withValues(alpha: 0.20),
|
|
|
|
|
textColor: AppColors.alertColor,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.appointment_calendar_icon,
|
|
|
|
|
labelText: DateUtil.formatDateToDate(
|
|
|
|
|
DateUtil.convertStringToDate(immediateLiveCareVM.patientLiveCareHistoryList[0].arrivalTime), false)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
|
|
|
|
|
// Lottie.asset(AppAnimations.pending_loading_animation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.cover),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
|
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
"Your turn is after ${immediateLiveCareVM.patientLiveCareHistoryList[0].patCount} patients.".needTranslation.toText14(isBold: true),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Expected waiting time: ".needTranslation.toText12(isBold: true),
|
|
|
|
|
SizedBox(height: 7.h),
|
|
|
|
|
ValueListenableBuilder<Duration>(
|
|
|
|
|
valueListenable: immediateLiveCareVM.durationNotifier,
|
|
|
|
|
builder: (context, duration, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
buildTime(duration),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// CustomButton(
|
|
|
|
|
// text: "View Details".needTranslation,
|
|
|
|
|
// onPressed: () async {
|
|
|
|
|
// Navigator.of(context).push(CustomPageRoute(page: ImmediateLiveCarePendingRequestPage()));
|
|
|
|
|
// },
|
|
|
|
|
// backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
// borderColor: Color(0xffFEE9EA),
|
|
|
|
|
// textColor: Color(0xffED1C2B),
|
|
|
|
|
// fontSize: 14.f,
|
|
|
|
|
// fontWeight: FontWeight.w500,
|
|
|
|
|
// borderRadius: 12.r,
|
|
|
|
|
// padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
|
|
|
|
|
// height: 40.h,
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(0.h, 0.h).onPress(() {
|
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: ImmediateLiveCarePendingRequestPage()));
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: (todoSectionVM.patientAncillaryOrdersList.isNotEmpty && index == 1)
|
|
|
|
|
? AncillaryOrderCard(
|
|
|
|
|
order: todoSectionVM.patientAncillaryOrdersList.first,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isOrdersList: false,
|
|
|
|
|
onCheckIn: () {
|
|
|
|
|
log("Check-in for order: ${todoSectionVM.patientAncillaryOrdersList.first.orderNo}");
|
|
|
|
|
},
|
|
|
|
|
onViewDetails: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: AncillaryOrderDetailsList(
|
|
|
|
|
appointmentNoVida: todoSectionVM.patientAncillaryOrdersList.first.appointmentNo ?? 0,
|
|
|
|
|
orderNo: todoSectionVM.patientAncillaryOrdersList.first.orderNo ?? 0,
|
|
|
|
|
projectID: todoSectionVM.patientAncillaryOrdersList.first.projectID ?? 0,
|
|
|
|
|
projectName: todoSectionVM.patientAncillaryOrdersList.first.projectName ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel:
|
|
|
|
|
myAppointmentsVM.patientAppointmentsHistoryList[immediateLiveCareViewModel.patientHasPendingLiveCareRequest ? --index : index],
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
return getIndexSwiperCard(index);
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
@ -773,6 +645,288 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getIndexSwiperCard(int index) {
|
|
|
|
|
if (index == 0) {
|
|
|
|
|
if (myAppointmentsViewModel.isPatientHasQueueAppointment) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 20.h,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
side: BorderSide(color: Utils.getCardBorderColor(myAppointmentsViewModel.currentQueueStatus), width: 2.w),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: myAppointmentsViewModel.currentQueueStatus == 0 ? "In Queue".needTranslation : "Your Turn".needTranslation,
|
|
|
|
|
backgroundColor: Utils.getCardBorderColor(myAppointmentsViewModel.currentQueueStatus).withValues(alpha: 0.20),
|
|
|
|
|
textColor: Utils.getCardBorderColor(myAppointmentsViewModel.currentQueueStatus),
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 2.h),
|
|
|
|
|
"Thank you for your patience, here is your queue number.".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
myAppointmentsViewModel.currentPatientQueueDetails.queueNo!.toText28(isBold: true),
|
|
|
|
|
SizedBox(height: 6.h),
|
|
|
|
|
myAppointmentsViewModel.patientQueueDetailsList.isNotEmpty
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
"Serving Now: ".needTranslation.toText14(isBold: true),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
myAppointmentsViewModel.patientQueueDetailsList.first.queueNo!.toText12(isBold: true),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
deleteIcon: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? AppAssets.call_for_vitals : AppAssets.call_for_doctor,
|
|
|
|
|
labelText: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation,
|
|
|
|
|
iconColor: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
textColor: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
iconSize: 14.w,
|
|
|
|
|
backgroundColor: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1
|
|
|
|
|
? AppColors.primaryRedColor.withValues(alpha: 0.1)
|
|
|
|
|
: AppColors.successColor.withValues(alpha: 0.1),
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 8.h, end: -2.h),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(height: 12.h),
|
|
|
|
|
SizedBox(height: 5.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: Utils.getCardButtonText(myAppointmentsViewModel.currentQueueStatus, myAppointmentsViewModel.currentPatientQueueDetails.roomNo ?? ""),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: Utils.getCardButtonColor(myAppointmentsViewModel.currentQueueStatus),
|
|
|
|
|
borderColor: Utils.getCardButtonColor(myAppointmentsViewModel.currentQueueStatus).withValues(alpha: 0.01),
|
|
|
|
|
textColor: Utils.getCardButtonTextColor(myAppointmentsViewModel.currentQueueStatus),
|
|
|
|
|
fontSize: 12.f,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
height: 40.h,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 18.h,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: AppointmentQueuePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
} else if (immediateLiveCareViewModel.patientHasPendingLiveCareRequest) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 20.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Immediate LiveCare Request".needTranslation.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: immediateLiveCareViewModel.patientLiveCareHistoryList[0].stringCallStatus,
|
|
|
|
|
backgroundColor: AppColors.warningColorYellow.withValues(alpha: 0.20),
|
|
|
|
|
textColor: AppColors.alertColor,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.appointment_calendar_icon,
|
|
|
|
|
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(immediateLiveCareViewModel.patientLiveCareHistoryList[0].arrivalTime), false)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
|
|
|
|
|
// Lottie.asset(AppAnimations.pending_loading_animation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.cover),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
|
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
"Your turn is after ${immediateLiveCareViewModel.patientLiveCareHistoryList[0].patCount} patients.".needTranslation.toText14(isBold: true),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Expected waiting time: ".needTranslation.toText12(isBold: true),
|
|
|
|
|
SizedBox(height: 7.h),
|
|
|
|
|
ValueListenableBuilder<Duration>(
|
|
|
|
|
valueListenable: immediateLiveCareViewModel.durationNotifier,
|
|
|
|
|
builder: (context, duration, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
buildTime(duration),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(0.h, 0.h).onPress(() {
|
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: ImmediateLiveCarePendingRequestPage()));
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
} else if (myAppointmentsViewModel.patientUpcomingAppointmentsHistoryList.isNotEmpty) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsViewModel.patientUpcomingAppointmentsHistoryList.first,
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsViewModel.patientAppointmentsHistoryList[index],
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else if (index == 1) {
|
|
|
|
|
if (myAppointmentsViewModel.isPatientHasQueueAppointment || immediateLiveCareViewModel.patientHasPendingLiveCareRequest) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsViewModel.patientUpcomingAppointmentsHistoryList.first,
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else if (todoSectionViewModel.patientAncillaryOrdersList.isNotEmpty) {
|
|
|
|
|
return AncillaryOrderCard(
|
|
|
|
|
order: todoSectionViewModel.patientAncillaryOrdersList.first,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isOrdersList: false,
|
|
|
|
|
onCheckIn: () {
|
|
|
|
|
log("Check-in for order: ${todoSectionViewModel.patientAncillaryOrdersList.first.orderNo}");
|
|
|
|
|
},
|
|
|
|
|
onViewDetails: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: AncillaryOrderDetailsList(
|
|
|
|
|
appointmentNoVida: todoSectionViewModel.patientAncillaryOrdersList.first.appointmentNo ?? 0,
|
|
|
|
|
orderNo: todoSectionViewModel.patientAncillaryOrdersList.first.orderNo ?? 0,
|
|
|
|
|
projectID: todoSectionViewModel.patientAncillaryOrdersList.first.projectID ?? 0,
|
|
|
|
|
projectName: todoSectionViewModel.patientAncillaryOrdersList.first.projectName ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsViewModel.patientAppointmentsHistoryList[index],
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else if (index == 2) {
|
|
|
|
|
if ((myAppointmentsViewModel.isPatientHasQueueAppointment || immediateLiveCareViewModel.patientHasPendingLiveCareRequest) &&
|
|
|
|
|
myAppointmentsViewModel.patientUpcomingAppointmentsHistoryList.isNotEmpty) {
|
|
|
|
|
return AncillaryOrderCard(
|
|
|
|
|
order: todoSectionViewModel.patientAncillaryOrdersList.first,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isOrdersList: false,
|
|
|
|
|
onCheckIn: () {
|
|
|
|
|
log("Check-in for order: ${todoSectionViewModel.patientAncillaryOrdersList.first.orderNo}");
|
|
|
|
|
},
|
|
|
|
|
onViewDetails: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: AncillaryOrderDetailsList(
|
|
|
|
|
appointmentNoVida: todoSectionViewModel.patientAncillaryOrdersList.first.appointmentNo ?? 0,
|
|
|
|
|
orderNo: todoSectionViewModel.patientAncillaryOrdersList.first.orderNo ?? 0,
|
|
|
|
|
projectID: todoSectionViewModel.patientAncillaryOrdersList.first.projectID ?? 0,
|
|
|
|
|
projectName: todoSectionViewModel.patientAncillaryOrdersList.first.projectName ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsViewModel.patientAppointmentsHistoryList[index],
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Container();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void showQuickLogin(BuildContext context) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
@ -831,4 +985,41 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void openIndoorNavigationBottomSheet(BuildContext context) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
title: LocaleKeys.selectHospital.tr(),
|
|
|
|
|
context,
|
|
|
|
|
child: ChangeNotifierProvider(
|
|
|
|
|
create: (context) => HospitalSelectionBottomSheetViewModel(getIt()),
|
|
|
|
|
child: Consumer<HospitalSelectionBottomSheetViewModel>(
|
|
|
|
|
builder: (_, vm, __) => HospitalBottomSheetBody(
|
|
|
|
|
searchText: vm.searchController,
|
|
|
|
|
displayList: vm.displayList,
|
|
|
|
|
onFacilityClicked: (value) {
|
|
|
|
|
vm.setSelectedFacility(value);
|
|
|
|
|
vm.getDisplayList();
|
|
|
|
|
},
|
|
|
|
|
onHospitalClicked: (hospital) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
vm.openPenguin(hospital);
|
|
|
|
|
},
|
|
|
|
|
onHospitalSearch: (value) {
|
|
|
|
|
vm.searchHospitals(value ?? "");
|
|
|
|
|
},
|
|
|
|
|
selectedFacility: vm.selectedFacility,
|
|
|
|
|
hmcCount: vm.hmcCount,
|
|
|
|
|
hmgCount: vm.hmgCount,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
hasBottomPadding: false,
|
|
|
|
|
backgroundColor: AppColors.bottomSheetBgColor,
|
|
|
|
|
callBackFunc: () {
|
|
|
|
|
context.read<EmergencyServicesViewModel>().clearSearchText();
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|