diff --git a/lib/config/customer_routes.dart b/lib/config/customer_routes.dart index 1b55355..2296dc4 100644 --- a/lib/config/customer_routes.dart +++ b/lib/config/customer_routes.dart @@ -17,16 +17,16 @@ import 'package:mc_common_app/views/advertisement/ads_detail_view.dart'; import 'package:mc_common_app/views/advertisement/create_ad_view.dart'; import 'package:mc_common_app/views/advertisement/select_ad_type_view.dart'; import 'package:mc_common_app/views/payments/payment_methods_view.dart'; -import 'package:mc_common_app/views/advertisement/ads_search_filter_view.dart'; +import 'package:mc_common_app/views/advertisement/ads_filter_view.dart'; -class CustomerAppRoutes { +class CustomerAppRoutes { static final Map routes = { AppRoutes.dashboard: (context) => DashboardPage(), AppRoutes.bookProviderAppView: (context) => BookProviderAppView(), AppRoutes.appointmentDetailView: (context) => AppointmentDetailView(appointmentListModel: ModalRoute.of(context)!.settings.arguments as AppointmentListModel), AppRoutes.adsDetailView: (context) => AdsDetailView(adDetails: ModalRoute.of(context)!.settings.arguments as AdDetailsModel), AppRoutes.createAdView: (context) => CreateAdView(), - AppRoutes.adsSearchFilterScreen: (context) => AdsSearchFilterView(), + AppRoutes.adsFilterView: (context) => AdsFilterView(), AppRoutes.selectAdTypeView: (context) => SelectAdTypeView(isProvider: ModalRoute.of(context)!.settings.arguments as bool), AppRoutes.bookAppointmenServicesView: (context) => BookAppointmentServicesView(), AppRoutes.bookAppointmenSchedulesView: (context) => BookAppointmentSchedulesView( diff --git a/lib/views/dashboard/dashboard_page.dart b/lib/views/dashboard/dashboard_page.dart index 83ca892..f0d4b5e 100644 --- a/lib/views/dashboard/dashboard_page.dart +++ b/lib/views/dashboard/dashboard_page.dart @@ -116,7 +116,12 @@ class _DashboardPageState extends State { (isHomePage ? MyAssets.notificationsBellIcon.buildSvg() : InkWell( - onTap: () => navigateWithName(context, AppRoutes.adsSearchFilterScreen), + onTap: () async { + if (context.read().selectedNavbarBarIndex == 3) { + await context.read().populateDataForAdFilter(); + navigateWithName(context, AppRoutes.adsFilterView); + } + }, child: MyAssets.searchIcon.buildSvg(), )) .paddingOnly(right: 21)