appointment slider fix

aamir_dev
Aamir.Muhammad 1 year ago
parent 6ed7e2fa3d
commit eeec5aeb85

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

@ -40,7 +40,7 @@ class AppointmentsFragment extends StatelessWidget {
Expanded( Expanded(
child: RefreshIndicator( child: RefreshIndicator(
onRefresh: () async { onRefresh: () async {
appointmentsVM.getMyAppointments(isNeedToRebuild: true); appointmentsVM.getMyAppointments();
}, },
child: appointmentsVM.state == ViewState.busy child: appointmentsVM.state == ViewState.busy
? const Center(child: CircularProgressIndicator()) ? 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:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
class HomeFragment extends StatelessWidget { class HomeFragment extends StatelessWidget {
const HomeFragment({Key? key}) : super(key: key); const HomeFragment({Key? key}) : super(key: key);
@ -40,7 +39,7 @@ class HomeFragment extends StatelessWidget {
context.read<AppointmentsVM>().applyFilterOnAppointmentsVM(appointmentStatusEnum: AppointmentStatusEnum.allAppointments); context.read<AppointmentsVM>().applyFilterOnAppointmentsVM(appointmentStatusEnum: AppointmentStatusEnum.allAppointments);
}, },
).horPaddingMain(), ).horPaddingMain(),
CustomerAppointmentSliderWidget(myUpComingAppointments: context.read<AppointmentsVM>().myUpComingAppointments), CustomerAppointmentSliderWidget(),
7.height, 7.height,
ViewAllWidget( ViewAllWidget(
title: LocaleKeys.my_recent_providers.tr().toUpperCase(), title: LocaleKeys.my_recent_providers.tr().toUpperCase(),

Loading…
Cancel
Save