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/profile
/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_language.dart';
import 'package:mc_common_app/views/chat/chat_view.dart';
import 'package:mc_common_app/views/branches/branches_filter_view.dart';
class CustomerAppRoutes {
static final Map<String, WidgetBuilder> routes = {
@ -35,13 +36,13 @@ class CustomerAppRoutes {
AppRoutes.adsFilterView: (context) => AdsFilterView(),
AppRoutes.selectAdTypeView: (context) => SelectAdTypeView(isProvider: ModalRoute.of(context)!.settings.arguments as bool),
AppRoutes.bookAppointmenServicesView: (context) => BookAppointmentServicesView(),
AppRoutes.bookAppointmenSchedulesView: (context) => BookAppointmentSchedulesView(
screenArgumentsForAppointmentDetailPage: ModalRoute.of(context)!.settings.arguments as ScreenArgumentsForAppointmentDetailPage,
),
AppRoutes.bookAppointmenSchedulesView: (context) =>
BookAppointmentSchedulesView(screenArgumentsForAppointmentDetailPage: ModalRoute.of(context)!.settings.arguments as ScreenArgumentsForAppointmentDetailPage),
AppRoutes.bookAppointmentsItemView: (context) => BookAppointmentsItemView(),
AppRoutes.reviewAppointmentView: (context) => ReviewAppointment(),
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.branchSearchFilterPage: (context) => BranchesFilterView(),
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.createRequestPage: (context) => CreateRequestPage(),

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

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

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

Loading…
Cancel
Save