Check appointmnet filter for provider

aamir_dev
Faiz Hashmi 9 months ago
parent e1a97cc5a7
commit cbffe18384

@ -34,7 +34,7 @@ class _DashboardViewState extends State<DashboardView> {
void initState() {
super.initState();
dashboardVM = context.read<DashboardVmCustomer>();
scheduleMicrotask(() => dashboardVM.onRefresh(context, dashboardRouteEnum: widget.dashboardRouteEnum));
scheduleMicrotask(() async => await dashboardVM.onRefresh(context, dashboardRouteEnum: widget.dashboardRouteEnum));
}
@override

@ -60,7 +60,8 @@ class AppointmentsFragment extends StatelessWidget {
},
),
16.height,
RefreshIndicator(
Expanded(
child: RefreshIndicator(
onRefresh: () async {
int index = appointmentsVM.appointmentsFilterOptions.indexWhere((element) => element.isSelected);
if (index != -1) {
@ -111,12 +112,13 @@ class AppointmentsFragment extends StatelessWidget {
navigateWithName(context, AppRoutes.appointmentDetailView, arguments: appointmentModel);
},
appointmentListModel: appointmentsVM.myFilteredAppointmentsForCustomers[index],
).margin(left: 21, right: 21);
).margin(left: 21, right: 21).toViewOnly(context, onTap: () {
navigateWithName(context, AppRoutes.loginWithPassword, arguments: false);
});
},
),
).toViewOnly(context, onTap: () {
navigateWithName(context, AppRoutes.loginWithPassword, arguments: false);
}),
),
)
],
),
),

@ -58,9 +58,7 @@ class HomeFragment extends StatelessWidget {
width: double.infinity,
height: double.infinity,
child: RefreshIndicator(
onRefresh: () async {
await context.read<DashboardVmCustomer>().onRefresh(context);
},
onRefresh: () async => await context.read<DashboardVmCustomer>().onRefresh(context),
child: ListView(
children: [
16.height,

Loading…
Cancel
Save