appointment slider fix

aamir_dev
Aamir.Muhammad 3 months ago
parent 6ed7e2fa3d
commit eeec5aeb85

@ -66,6 +66,7 @@ class _DashboardPageState extends State<DashboardPage> {
await appointmentsVM.getMyAppointments();
}
if (appointmentsVM.nearbyBranches.isEmpty) {
await appointmentsVM.applyFilterOnBranches(index: 0); // to get all branches!
}

@ -40,7 +40,7 @@ class AppointmentsFragment extends StatelessWidget {
Expanded(
child: RefreshIndicator(
onRefresh: () async {
appointmentsVM.getMyAppointments(isNeedToRebuild: true);
appointmentsVM.getMyAppointments();
},
child: appointmentsVM.state == ViewState.busy
? const Center(child: CircularProgressIndicator())

@ -14,7 +14,6 @@ import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart';
class HomeFragment extends StatelessWidget {
const HomeFragment({Key? key}) : super(key: key);
@ -40,12 +39,12 @@ class HomeFragment extends StatelessWidget {
context.read<AppointmentsVM>().applyFilterOnAppointmentsVM(appointmentStatusEnum: AppointmentStatusEnum.allAppointments);
},
).horPaddingMain(),
CustomerAppointmentSliderWidget(myUpComingAppointments: context.read<AppointmentsVM>().myUpComingAppointments),
CustomerAppointmentSliderWidget(),
7.height,
ViewAllWidget(
title: LocaleKeys.my_recent_providers.tr().toUpperCase(),
subTitle: LocaleKeys.view_all.tr(),
onSubtitleTapped: () {
onSubtitleTapped: () {
context.read<DashboardVmCustomer>().onNavbarTapped(0);
context.read<AppointmentsVM>().applyFilterOnBranches(index: 0);
}).horPaddingMain(),

Loading…
Cancel
Save