|
|
|
|
@ -95,9 +95,59 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 24.h),
|
|
|
|
|
child: Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
return bookAppointmentsViewModel.isLiveCareSchedule
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ListView.separated(
|
|
|
|
|
padding: EdgeInsets.only(top: 16.h),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
itemCount: bookAppointmentsVM.isDoctorsListLoading ? 5 : (bookAppointmentsVM.liveCareDoctorsList.isNotEmpty ? bookAppointmentsVM.liveCareDoctorsList.length : 1),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
// final isExpanded = bookAppointmentsVM.expandedGroupIndex == index;
|
|
|
|
|
final isExpanded = true;
|
|
|
|
|
return bookAppointmentsVM.isDoctorsListLoading
|
|
|
|
|
? DoctorCard(
|
|
|
|
|
doctorsListResponseModel: DoctorsListResponseModel(),
|
|
|
|
|
isLoading: true,
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
)
|
|
|
|
|
: bookAppointmentsVM.liveCareDoctorsList.isEmpty
|
|
|
|
|
? Utils.getNoDataWidget(context, noDataText: LocaleKeys.noDoctorFound.tr())
|
|
|
|
|
: 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,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
isLoading: bookAppointmentsVM.isClinicsListLoading,
|
|
|
|
|
doctorsListResponseModel: bookAppointmentsVM.liveCareDoctorsList[index],
|
|
|
|
|
bookAppointmentsViewModel: bookAppointmentsViewModel,
|
|
|
|
|
).onPress(() {
|
|
|
|
|
// onLiveCareClinicSelected(bookAppointmentsVM.liveCareClinicsList[index]);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Row(
|
|
|
|
|
spacing: 8.h,
|
|
|
|
|
|