|
|
|
|
@ -451,7 +451,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
height: isTablet ? 290.h : 255.h,
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: 3,
|
|
|
|
|
itemCount: myAppointmentsVM.patientAppointmentsHistoryList.length < 3 ? myAppointmentsVM.patientAppointmentsHistoryList.length : 3,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(left: 16.h, right: 16.h),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
@ -980,9 +980,14 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[1],
|
|
|
|
|
);
|
|
|
|
|
// Safety check: ensure list has at least 2 items
|
|
|
|
|
if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 1) {
|
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[1],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Container(); // Return empty container if not enough items
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Third slot: Shows ancillary orders or appointment
|
|
|
|
|
@ -996,9 +1001,14 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
|
|
|
|
|
);
|
|
|
|
|
// Safety check: ensure list has at least 3 items
|
|
|
|
|
if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 2) {
|
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Container(); // Return empty container if not enough items
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Queue Card Widget
|
|
|
|
|
|