|
|
|
|
@ -24,7 +24,7 @@ import 'package:mc_common_app/config/routes.dart';
|
|
|
|
|
import 'package:mc_common_app/models/advertisment_models/ad_details_model.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:mc_common_app/models/model/provider_model.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:mc_common_app/models/provider_branches_models/branch_detail_model.dart';
|
|
|
|
|
import 'package:mc_common_app/views/advertisement/ads_detail_view.dart';
|
|
|
|
|
import 'package:mc_common_app/views/advertisement/create_ad_view.dart';
|
|
|
|
|
@ -66,15 +66,22 @@ class ProviderAppRoutes {
|
|
|
|
|
static final Map<String, WidgetBuilder> routes = {
|
|
|
|
|
//Home page
|
|
|
|
|
AppRoutes.dashboard: (context) => const DashboardPage(),
|
|
|
|
|
AppRoutes.adsDetailView: (context) => AdsDetailView(adDetails: ModalRoute.of(context)!.settings.arguments as AdDetailsModel),
|
|
|
|
|
AppRoutes.adsDetailView: (context) => AdsDetailView(
|
|
|
|
|
adDetails:
|
|
|
|
|
ModalRoute.of(context)!.settings.arguments as AdDetailsModel),
|
|
|
|
|
AppRoutes.createAdView: (context) => const CreateAdView(),
|
|
|
|
|
|
|
|
|
|
//setting
|
|
|
|
|
defineLicense: (context) => DefineLicensePage(),
|
|
|
|
|
dealershipSetting: (context) => DealershipPage(),
|
|
|
|
|
// branchList: (context) => BranchListPage(),
|
|
|
|
|
defineBranch: (context) => DefineBranchPage((ModalRoute.of(context)!.settings.arguments) == null ? null : (ModalRoute.of(context)!.settings.arguments as BranchDetailModel)),
|
|
|
|
|
branchDetail: (context) => BranchDetailPage(ModalRoute.of(context)!.settings.arguments as BranchDetailModel),
|
|
|
|
|
defineBranch: (context) => DefineBranchPage(
|
|
|
|
|
(ModalRoute.of(context)!.settings.arguments) == null
|
|
|
|
|
? null
|
|
|
|
|
: (ModalRoute.of(context)!.settings.arguments
|
|
|
|
|
as BranchDetailModel)),
|
|
|
|
|
branchDetail: (context) => BranchDetailPage(
|
|
|
|
|
ModalRoute.of(context)!.settings.arguments as BranchDetailModel),
|
|
|
|
|
|
|
|
|
|
//Appointments
|
|
|
|
|
appointmentDetailList: (context) => const AppointmentDetailListPage(),
|
|
|
|
|
@ -89,19 +96,31 @@ class ProviderAppRoutes {
|
|
|
|
|
AppRoutes.subscriptionsPage: (context) => const SubscriptionsPage(),
|
|
|
|
|
|
|
|
|
|
//Services
|
|
|
|
|
dealerUser: (context) => DealerUserPage(ModalRoute.of(context)!.settings.arguments as String),
|
|
|
|
|
dealerUser: (context) =>
|
|
|
|
|
DealerUserPage(ModalRoute.of(context)!.settings.arguments as String),
|
|
|
|
|
servicesList: (context) => const ServicesListPage(),
|
|
|
|
|
itemsList: (context) => ItemsListPage(),
|
|
|
|
|
createItem: (context) => const CreateItemPage(),
|
|
|
|
|
//createServices: (context) => CreateServicesPage((ModalRoute.of(context)!.settings.arguments) == null ? null : (ModalRoute.of(context)!.settings.arguments as ServiceProviderBranch)),
|
|
|
|
|
//createServices2: (context) => CreateServicesPage2((ModalRoute.of(context)!.settings.arguments) == null ? null : (ModalRoute.of(context)!.settings.arguments as ServiceProviderBranch)),
|
|
|
|
|
createServices3: (context) => CreateServicesPage3((ModalRoute.of(context)!.settings.arguments) == null ? null : (ModalRoute.of(context)!.settings.arguments as CreateBranchModel)),
|
|
|
|
|
createServices3: (context) => CreateServicesPage3(
|
|
|
|
|
(ModalRoute.of(context)!.settings.arguments) == null
|
|
|
|
|
? null
|
|
|
|
|
: (ModalRoute.of(context)!.settings.arguments
|
|
|
|
|
as CreateBranchModel)),
|
|
|
|
|
|
|
|
|
|
//Schedules
|
|
|
|
|
schedulesList: (context) => SchedulesListPage((ModalRoute.of(context)!.settings.arguments) == null ? null : (ModalRoute.of(context)!.settings.arguments as String)),
|
|
|
|
|
schedulesList: (context) => SchedulesListPage(
|
|
|
|
|
(ModalRoute.of(context)!.settings.arguments) == null
|
|
|
|
|
? null
|
|
|
|
|
: (ModalRoute.of(context)!.settings.arguments as String)),
|
|
|
|
|
addSchedule: (context) => AddSchedulesPage(),
|
|
|
|
|
|
|
|
|
|
//Branch Duplication
|
|
|
|
|
matchServices: (context) => MatchedServicesPage((ModalRoute.of(context)!.settings.arguments) == null ? null : (ModalRoute.of(context)!.settings.arguments as MatchServicesArguments)),
|
|
|
|
|
matchServices: (context) => MatchedServicesPage(
|
|
|
|
|
(ModalRoute.of(context)!.settings.arguments) == null
|
|
|
|
|
? null
|
|
|
|
|
: (ModalRoute.of(context)!.settings.arguments
|
|
|
|
|
as MatchServicesArguments)),
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|