Added Branch FilterView

aamir_dev
Faiz Hashmi 2 years ago
parent 27fb9a2eab
commit e2de476581

2
.gitignore vendored

@ -44,3 +44,5 @@ app.*.map.json
/android/app/debug /android/app/debug
/android/app/profile /android/app/profile
/android/app/release /android/app/release
pubspec.lock

@ -24,6 +24,7 @@ import 'package:mc_common_app/views/setting_options/setting_options_faqs.dart';
import 'package:mc_common_app/views/setting_options/setting_options_invite_friends.dart'; import 'package:mc_common_app/views/setting_options/setting_options_invite_friends.dart';
import 'package:mc_common_app/views/setting_options/setting_options_language.dart'; import 'package:mc_common_app/views/setting_options/setting_options_language.dart';
import 'package:mc_common_app/views/chat/chat_view.dart'; import 'package:mc_common_app/views/chat/chat_view.dart';
import 'package:mc_common_app/views/branches/branches_filter_view.dart';
class CustomerAppRoutes { class CustomerAppRoutes {
static final Map<String, WidgetBuilder> routes = { static final Map<String, WidgetBuilder> routes = {
@ -35,13 +36,13 @@ class CustomerAppRoutes {
AppRoutes.adsFilterView: (context) => AdsFilterView(), AppRoutes.adsFilterView: (context) => AdsFilterView(),
AppRoutes.selectAdTypeView: (context) => SelectAdTypeView(isProvider: ModalRoute.of(context)!.settings.arguments as bool), AppRoutes.selectAdTypeView: (context) => SelectAdTypeView(isProvider: ModalRoute.of(context)!.settings.arguments as bool),
AppRoutes.bookAppointmenServicesView: (context) => BookAppointmentServicesView(), AppRoutes.bookAppointmenServicesView: (context) => BookAppointmentServicesView(),
AppRoutes.bookAppointmenSchedulesView: (context) => BookAppointmentSchedulesView( AppRoutes.bookAppointmenSchedulesView: (context) =>
screenArgumentsForAppointmentDetailPage: ModalRoute.of(context)!.settings.arguments as ScreenArgumentsForAppointmentDetailPage, BookAppointmentSchedulesView(screenArgumentsForAppointmentDetailPage: ModalRoute.of(context)!.settings.arguments as ScreenArgumentsForAppointmentDetailPage),
),
AppRoutes.bookAppointmentsItemView: (context) => BookAppointmentsItemView(), AppRoutes.bookAppointmentsItemView: (context) => BookAppointmentsItemView(),
AppRoutes.reviewAppointmentView: (context) => ReviewAppointment(), AppRoutes.reviewAppointmentView: (context) => ReviewAppointment(),
AppRoutes.paymentMethodsView: (context) => PaymentMethodsView(paymentType: ModalRoute.of(context)!.settings.arguments as PaymentTypes), AppRoutes.paymentMethodsView: (context) => PaymentMethodsView(paymentType: ModalRoute.of(context)!.settings.arguments as PaymentTypes),
AppRoutes.branchDetailPage: (context) => BranchDetailPage(branchDetailModel: ModalRoute.of(context)!.settings.arguments as BranchDetailModel), AppRoutes.branchDetailPage: (context) => BranchDetailPage(branchDetailModel: ModalRoute.of(context)!.settings.arguments as BranchDetailModel),
AppRoutes.branchSearchFilterPage: (context) => BranchesFilterView(),
AppRoutes.providerProfilePage: (context) => ProviderProfilePage(providerId: ModalRoute.of(context)!.settings.arguments as int), AppRoutes.providerProfilePage: (context) => ProviderProfilePage(providerId: ModalRoute.of(context)!.settings.arguments as int),
AppRoutes.offersListPage: (context) => OfferListPage(offerListPageArguments: ModalRoute.of(context)!.settings.arguments as OfferListPageArguments), AppRoutes.offersListPage: (context) => OfferListPage(offerListPageArguments: ModalRoute.of(context)!.settings.arguments as OfferListPageArguments),
AppRoutes.createRequestPage: (context) => CreateRequestPage(), AppRoutes.createRequestPage: (context) => CreateRequestPage(),

@ -1,5 +1,6 @@
import 'package:car_customer_app/config/customer_dependencies.dart'; import 'package:car_customer_app/config/customer_dependencies.dart';
import 'package:car_customer_app/config/customer_routes.dart'; import 'package:car_customer_app/config/customer_routes.dart';
import 'package:mc_common_app/repositories/branch_repo.dart';
import 'package:mc_common_app/repositories/chat_repo.dart'; import 'package:mc_common_app/repositories/chat_repo.dart';
import 'package:mc_common_app/repositories/provider_repo.dart'; import 'package:mc_common_app/repositories/provider_repo.dart';
import 'package:mc_common_app/repositories/appointment_repo.dart'; import 'package:mc_common_app/repositories/appointment_repo.dart';
@ -66,6 +67,7 @@ Future<void> main() async {
providerRepo: injector.get<ProviderRepo>(), providerRepo: injector.get<ProviderRepo>(),
commonServices: injector.get<CommonAppServices>(), commonServices: injector.get<CommonAppServices>(),
commonRepo: injector.get<CommonRepo>(), commonRepo: injector.get<CommonRepo>(),
branchRepo: injector.get<BranchRepo>(),
), ),
), ),
ChangeNotifierProvider<PaymentVM>( ChangeNotifierProvider<PaymentVM>(

@ -136,19 +136,21 @@ class _DashboardPageState extends State<DashboardPage> {
(isHomePage (isHomePage
? Row( ? Row(
children: [ children: [
"${AppState().currentAppType}".toText(color: MyColors.darkTextColor).onPress(() { "${AppState().currentAppType}".toText(color: MyColors.darkTextColor).onPress(
print("myId: ${AppState().getUser.data!.userInfo!.userId}"); () {
print("myId: ${AppState().getUser.data!.userInfo!.customerId}"); print("userId: ${AppState().getUser.data!.userInfo!.userId}");
// context.read<ChatVM>().buildHubConnection(); print("customerId: ${AppState().getUser.data!.userInfo!.customerId}");
}), // context.read<ChatVM>().buildHubConnection();
},
),
10.width, 10.width,
MyAssets.notificationsBellIcon.buildSvg().onPress(() {}), MyAssets.notificationsBellIcon.buildSvg().onPress(() {}),
15.width, 15.width,
Icon(Icons.message, color: MyColors.darkTextColor).onPress(() { Icon(Icons.message, color: MyColors.darkTextColor).onPress(
context.read<AppointmentsVM>().populateAppointmentsFilterList(); () {
_onRefresh();
_onRefresh(); },
}), ),
], ],
) )
: InkWell( : InkWell(
@ -157,6 +159,10 @@ class _DashboardPageState extends State<DashboardPage> {
await context.read<AdVM>().populateDataForAdFilter(); await context.read<AdVM>().populateDataForAdFilter();
navigateWithName(context, AppRoutes.adsFilterView); navigateWithName(context, AppRoutes.adsFilterView);
} }
if (dashboardVM.selectedNavbarBarIndex == 0) {
await context.read<AppointmentsVM>().populateDataForBranchesFilter();
navigateWithName(context, AppRoutes.branchSearchFilterPage);
}
}, },
child: MyAssets.searchIcon.buildSvg(), child: MyAssets.searchIcon.buildSvg(),
)) ))

@ -36,7 +36,7 @@ dependencies:
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
mc_common_app: mc_common_app:
path: C:/Users/mirza.shafique/AndroidStudioProjects/mc_common_app path: /Volumes/Data/Projects/Flutter/car_common_app
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

Loading…
Cancel
Save