import 'package:get/get.dart'; import 'package:vitalapp/pages/admin/controller.dart'; import 'package:vitalapp/pages/admin/view.dart'; import 'package:vitalapp/pages/check/traditional_chinese_medicine_consitution_record/controller.dart'; import 'package:vitalapp/pages/check/traditional_chinese_medicine_consitution_record/view.dart'; import 'package:vitalapp/pages/contract/package_list/widgets/capture_portrait.dart'; import 'package:vitalapp/pages/contract/package_list/widgets/family_doctor_service_package.dart'; import 'package:vitalapp/pages/contract/package_list/widgets/personal_information.dart'; import 'package:vitalapp/pages/contract/package_list/widgets/remark.dart'; import 'package:vitalapp/pages/contract/package_list/widgets/service_information.dart'; import 'package:vitalapp/pages/data_sync/center/controller.dart'; import 'package:vitalapp/pages/data_sync/center/view.dart'; import 'package:vitalapp/pages/data_sync/index/controller.dart'; import 'package:vitalapp/pages/data_sync/index/view.dart'; import 'package:vitalapp/pages/from_page/controller.dart'; import 'package:vitalapp/pages/check/follow_up_record/controller.dart'; import 'package:vitalapp/pages/check/follow_up_record/view.dart'; import 'package:vitalapp/pages/home/personal_center/controller.dart'; import 'package:vitalapp/pages/home/personal_center/view.dart'; import 'package:vitalapp/pages/medical/controller.dart'; import 'package:vitalapp/pages/medical/records/controller.dart'; import 'package:vitalapp/pages/medical/records/view.dart'; import 'package:vitalapp/pages/medical/view.dart'; import 'package:vitalapp/pages/medical/views/basic_check.dart'; import 'package:vitalapp/pages/medical/views/biochemistry_check.dart'; import 'package:vitalapp/pages/medical/views/blood_check.dart'; import 'package:vitalapp/pages/medical/views/heart_check_new.dart'; import 'package:vitalapp/pages/medical/views/traditional_chinese_check.dart'; import 'package:vitalapp/pages/medical/views/urine_check.dart'; import 'package:vitalapp/pages/medical/widgets/health_check/health_check_list/controller.dart'; import 'package:vitalapp/pages/medical/widgets/health_heart_check/health_check_list/controller.dart'; import 'package:vitalapp/pages/medical_checkup_station/appointment/controller.dart'; import 'package:vitalapp/pages/medical_checkup_station/appointment/view.dart'; import 'package:vitalapp/pages/medical_checkup_station/registration/controller.dart'; import 'package:vitalapp/pages/medical_checkup_station/registration/view/index.dart'; import 'package:vitalapp/pages/patient/create/widgets/quick_create.dart'; import 'package:vitalapp/pages/redirect/redirect.dart'; import 'package:vitalapp/pages/settings/center/controller.dart'; import 'package:vitalapp/pages/settings/center/view.dart'; import 'package:vitalapp/pages/settings/devices/controller.dart'; import 'package:vitalapp/pages/settings/server/controller.dart'; import 'package:vitalapp/pages/traditional_chinese_medicine_constitution/controller.dart'; import 'package:vitalapp/routes/route_setting.dart'; import 'package:vitalapp/pages/check/examination/controller.dart'; import 'package:vitalapp/pages/check/examination/view.dart'; import 'package:vitalapp/pages/check/follow_up/controller.dart'; import 'package:vitalapp/pages/check/follow_up/view.dart'; import 'package:vitalapp/pages/check/health_check_record/controller.dart'; import 'package:vitalapp/pages/check/health_check_record/view.dart'; import 'package:vitalapp/pages/contract/contract_record_html/controller.dart'; import 'package:vitalapp/pages/contract/contract_records/controller.dart'; import 'package:vitalapp/pages/contract/contract_records/view.dart'; import 'package:vitalapp/pages/contract/contract_template/controller.dart'; import 'package:vitalapp/pages/contract/contract_template/view.dart'; import 'package:vitalapp/pages/contract/package_info/controller.dart'; import 'package:vitalapp/pages/contract/package_info/view.dart'; import 'package:vitalapp/pages/contract/package_list/controller.dart'; import 'package:vitalapp/pages/contract/package_list/view.dart'; import 'package:vitalapp/pages/contract/signature_board/controller.dart'; import 'package:vitalapp/pages/contract/signature_board/view.dart'; import 'package:vitalapp/pages/controllers/crowd_labels.dart'; import 'package:vitalapp/pages/dashboard/controller.dart'; import 'package:vitalapp/pages/dashboard/view.dart'; import 'package:vitalapp/pages/home/controller.dart'; import 'package:vitalapp/pages/home/view.dart'; import 'package:vitalapp/pages/login/controller.dart'; import 'package:vitalapp/pages/login/view.dart'; import 'package:vitalapp/pages/login_gateway/controller.dart'; import 'package:vitalapp/pages/login_gateway/view.dart'; import 'package:vitalapp/pages/patient/create/controller.dart'; import 'package:vitalapp/pages/patient/detail/controller.dart'; import 'package:vitalapp/pages/patient/detail/view.dart'; import 'package:vitalapp/pages/patient/info/controller.dart'; import 'package:vitalapp/pages/patient/info/view.dart'; import 'package:vitalapp/pages/patient/list/controller.dart'; import 'package:vitalapp/pages/patient/list/view.dart'; import 'package:vitalapp/pages/splash/controller.dart'; import 'package:vitalapp/pages/splash/view.dart'; import '../pages/contract/contract_record_html/view.dart'; class Routes { static Map parameters = {}; static final routes = [ VRouteSetting( '/admin', () => const AdminPage(), binding: BindingsBuilder( () { Get.put(AdminController()); }, ), ), VRouteSetting( '/redirect', () => const RedirectPage(), ), VRouteSetting( "/splash", () => const SplashPage(), binding: BindingsBuilder( () { Get.put(SplashController()); }, ), ), VRouteSetting( "/login", () => const LoginPage(), binding: BindingsBuilder( () { Get.put(LoginController()); }, ), ), VRouteSetting( "/login/gateway", () => const LoginGatewayPage(), binding: BindingsBuilder( () { Get.put(LoginGatewayController()); }, ), ), VRouteSetting( "/", () => const HomePage(), binding: BindingsBuilder( () { Get.put(HomeController()); }, ), ), VRouteSetting( "/dashboard", // participatesInRootNavigator: false, // preventDuplicates: true, () => const DashboardPage(), binding: BindingsBuilder( () { Get.put(DashboardController()); }, ), ), // VRouteSetting( // "/settings", // () => const SettingsPage(), // binding: BindingsBuilder( // () { // Get.put(SettingsController()); // }, // ), // ), VRouteSetting( "/settings", () => const SettingCenterPage(), binding: BindingsBuilder( () { Get.lazyPut(() => DevicesSettingController()); Get.lazyPut(() => ServerSettingController()); Get.put(SettingCenterController()); }, ), ), VRouteSetting( "/data_sync", () => const DataSyncPage(), binding: BindingsBuilder( () { Get.put(DataSyncController()); }, ), ), VRouteSetting( "/sync/center", () => const SyncCenterPage(), binding: BindingsBuilder( () { Get.put(SyncCenterController()); }, ), ), VRouteSetting( "/patient/create", // participatesInRootNavigator: false, // preventDuplicates: true, () => const QuickCreatePatientPage(), binding: BindingsBuilder( () { Get.lazyPut(() => CrowdLabelsController()); if (!Get.isRegistered()) { Get.lazyPut(() => CreatePatientController()); } Get.lazyPut(() => PatientListController()); Get.lazyPut(() => PatientDetailController()); }, ), ), VRouteSetting( "/patient/list", // participatesInRootNavigator: false, // preventDuplicates: true, () => const PatientListPage(), binding: BindingsBuilder( () { Get.lazyPut(() => CrowdLabelsController()); if (!Get.isRegistered()) { Get.lazyPut(() => CreatePatientController()); } Get.lazyPut(() => PatientListController()); Get.lazyPut(() => PatientDetailController()); }, ), ), VRouteSetting( "/patient/detail", // preventDuplicates: true, () => const PatientDetailPage(), binding: BindingsBuilder( () { Get.put(CrowdLabelsController()); Get.put(PatientDetailController()); }, ), ), VRouteSetting( "/patient/info", () => const PatientInfoPage(), binding: BindingsBuilder( () { Get.put(PatientInfoController()); }, ), ), VRouteSetting( "/contract/package_list", () => const ServicePackageContractPage(), binding: BindingsBuilder( () { Get.put(CrowdLabelsController()); Get.put(ServicePackageContractController()); Get.put(FromPageController()); }, ), ), VRouteSetting( "/contract/package_info", () => const PackageInfoPage(), binding: BindingsBuilder( () { Get.put(PackageInfoController()); }, ), ), VRouteSetting( "/contract/signature", () => SignatureBoardPage(), binding: BindingsBuilder( () { Get.put(SignatureBoardController()); }, ), ), VRouteSetting( "/contract/contract_template", () => ContractTemplatePage(), binding: BindingsBuilder( () { Get.put(ContractTemplateController()); }, ), ), VRouteSetting( "/check/form", () => const ExaminationPage(), binding: BindingsBuilder( () { Get.put(ExaminationController()); }, ), ), VRouteSetting( "/check/follow_up", () => const FollowUpPage(), binding: BindingsBuilder( () { Get.put(FollowUpController()); }, ), ), VRouteSetting( "/check/healthCheckRecord", () => const HealthCheckRecordPage(), binding: BindingsBuilder( () { Get.put(HealthCheckRecordController()); }, ), ), VRouteSetting( "/contract/contract_records", () => const ContractRecordsPage(), binding: BindingsBuilder( () { Get.put(ContractRecordsController()); }, ), ), VRouteSetting( "/contract/contract_record_html", () => const ContractRecordsHtmlPage(), binding: BindingsBuilder( () { Get.put(ContractRecordsHtmlController()); }, ), ), VRouteSetting( "/contract/package_list/capture_portrait", () => const CapturePortraitPage(), binding: BindingsBuilder( () { // Get.put(CrowdLabelsController()); // Get.put(ServicePackageContractController()); }, ), ), VRouteSetting( "/contract/package_list/family_doctor_service_package", () => const FamilyDoctorServicePackagePage(), binding: BindingsBuilder( () { // Get.put(CrowdLabelsController()); // Get.put(ServicePackageContractController()); }, ), ), VRouteSetting( "/contract/package_list/personal_information", () => const PersonalInformationPage(), binding: BindingsBuilder( () { // Get.put(CrowdLabelsController()); // Get.put(ServicePackageContractController()); }, ), ), VRouteSetting( "/contract/package_list/remark", () => const RemarkPage(), binding: BindingsBuilder( () { // Get.put(CrowdLabelsController()); // Get.put(ServicePackageContractController()); }, ), ), VRouteSetting( "/contract/package_list/service_information", () => const ServiceInformationPage(), binding: BindingsBuilder(() { // Get.put(CrowdLabelsController()); // Get.put(ServicePackageContractController()); }), ), VRouteSetting( '/check/follow_up_record', () => const FollowUpRecordPage(), binding: BindingsBuilder( () { Get.put(FollowUpRecordController()); }, ), ), VRouteSetting( '/medical', () => const MedicalPage(), binding: BindingsBuilder( () { if (!Get.isRegistered()) { Get.lazyPut(() => MedicalController()); } Get.put(PatientDetailController()); }, ), ), VRouteSetting( '/home/personal_center', () => const PersonalCenterPage(), binding: BindingsBuilder( () { Get.put(PersonalCenterController()); }, ), ), VRouteSetting( '/TraditionalChineseMedicineConstitution', () => TraditionalChineseCheck(), binding: BindingsBuilder( () { Get.put(TraditionalChineseMedicineConstitutionController()); Get.put(HealthCheckListController(checkKey: 'HEITCMC')); }, ), ), VRouteSetting( '/medical/records', () => const MedicalRecordsPage(), binding: BindingsBuilder( () { Get.put(MedicalRecordsController()); }, ), ), VRouteSetting( '/TraditionalChineseMedicineConsitutionRecord', () => const TraditionalChineseMedicineConsitutionRecordPage(), binding: BindingsBuilder( () { Get.put(TraditionalChineseMedicineConsitutionRecordController()); }, ), ), VRouteSetting( '/registrationList', () => RegistrationList(), binding: BindingsBuilder( () { Get.put(RegistrationController()); }, ), ), VRouteSetting( '/appointment', () => const AppointmentPage(), binding: BindingsBuilder( () { Get.put(AppointmentController()); }, ), ), // VRouteSetting( // '/basicCheck', // () => JiChuJianCha(), // binding: BindingsBuilder( // () { // // Get.put(RegistrationListController()); // if (!Get.isRegistered()) { // Get.lazyPut(() => MedicalController()); // } // Get.put(PatientDetailController()); // Get.put(HealthCheckListController()); // }, // ), // ), VRouteSetting( '/electrocardiogram', () => const HeartCheckNew(), binding: BindingsBuilder( () { if (!Get.isRegistered()) { Get.lazyPut(() => MedicalController()); } Get.put(PatientDetailController()); Get.put(HealthCheckListController()); Get.put(HeartCheckListController()); }, ), ), VRouteSetting( '/basicCheck', () => BasicCheck(), binding: BindingsBuilder( () { Get.put(PatientDetailController()); Get.put(HealthCheckListController()); }, ), ), VRouteSetting( '/ncg', () => const UrineAnalysisCheck(), binding: BindingsBuilder( () { if (!Get.isRegistered()) { Get.lazyPut(() => MedicalController()); } Get.put(PatientDetailController()); Get.put(HealthCheckListController()); }, ), ), VRouteSetting( '/bloodTest', () => BloodCheck(), binding: BindingsBuilder( () { if (!Get.isRegistered()) { Get.lazyPut(() => MedicalController()); } Get.put(PatientDetailController()); Get.put(HealthCheckListController()); }, ), ), VRouteSetting( '/biochemistryTest', () => BiochemistryCheck(), binding: BindingsBuilder( () { if (!Get.isRegistered()) { Get.lazyPut(() => MedicalController()); } Get.put(PatientDetailController()); Get.put(HealthCheckListController()); }, ), ), ]; }