From fdf432f30d631a551aa888ca1e2fbcf67d7a02ed Mon Sep 17 00:00:00 2001 From: Faiz Hashmi Date: Thu, 23 May 2024 10:52:44 +0300 Subject: [PATCH] Bug Fixes --- lib/views/dashboard/dashboard_page.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/views/dashboard/dashboard_page.dart b/lib/views/dashboard/dashboard_page.dart index 8d7225f..2eb1ad0 100644 --- a/lib/views/dashboard/dashboard_page.dart +++ b/lib/views/dashboard/dashboard_page.dart @@ -42,14 +42,20 @@ class _DashboardPageState extends State { super.initState(); // dashboardVM = Provider.of(context, listen: false); scheduleMicrotask(() { - context.read().populateAppointmentsFilterList(); - context.read().populateBranchesFilterList(); - context.read().populateRequestsFilterList(); - context.read().populateAdsFilterList(); + onInitState(); _onRefresh(); }); } + onInitState() async { + Future.wait([ + context.read().populateAppointmentsFilterList(), + context.read().populateBranchesFilterList(), + context.read().populateRequestsFilterList(), + context.read().populateAdsFilterList(), + ]); + } + Future _onRefresh() async { AdVM adVM = Provider.of(context, listen: false); AppointmentsVM appointmentsVM = Provider.of(context, listen: false);