You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctor_app_flutter/lib/locator.dart

110 lines
5.7 KiB
Dart

4 years ago
import 'package:doctor_app_flutter/core/service/auth_service.dart';
4 years ago
import 'package:doctor_app_flutter/core/service/dasboard_service.dart';
4 years ago
import 'package:doctor_app_flutter/core/service/medical_file_service.dart';
import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
4 years ago
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
4 years ago
import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
4 years ago
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
4 years ago
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
4 years ago
import 'package:get_it/get_it.dart';
import 'core/service/DischargedPatientService.dart';
import 'core/service/InsuranceCardService.dart';
import 'core/service/MyReferralPatientService.dart';
4 years ago
import 'core/service/PatientMuseService.dart';
import 'core/service/ReferralService.dart';
import 'core/service/SOAP_service.dart';
import 'core/service/doctor_reply_service.dart';
4 years ago
import 'core/service/labs_service.dart';
import 'core/service/medicine_service.dart';
4 years ago
import 'core/service/patient-admission-request-service.dart';
import 'core/service/patient-doctor-referral-service.dart';
4 years ago
import 'core/service/patient-ucaf-service.dart';
import 'core/service/patient-vital-signs-service.dart';
import 'core/service/prescriptions_service.dart';
import 'core/service/radiology_service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart';
import 'core/viewModel/DischargedPatientViewModel.dart';
import 'core/viewModel/InsuranceViewModel.dart';
4 years ago
import 'core/viewModel/PatientMuseViewModel.dart';
import 'core/viewModel/PatientSearchViewModel.dart';
import 'core/viewModel/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/labs_view_model.dart';
import 'core/viewModel/medicine_view_model.dart';
import 'core/viewModel/patient-admission-request-viewmodel.dart';
4 years ago
import 'core/viewModel/patient-referral-viewmodel.dart';
4 years ago
import 'core/viewModel/patient-ucaf-viewmodel.dart';
import 'core/viewModel/patient-vital-sign-viewmodel.dart';
import 'core/viewModel/prescriptions_view_model.dart';
import 'core/viewModel/radiology_view_model.dart';
import 'core/viewModel/referral_view_model.dart';
import 'core/viewModel/referred_view_model.dart';
import 'core/viewModel/schedule_view_model.dart';
4 years ago
GetIt locator = GetIt.instance;
///di
void setupLocator() {
/// Services
locator.registerLazySingleton(() => DoctorReplyService());
locator.registerLazySingleton(() => ScheduleService());
locator.registerLazySingleton(() => ReferralPatientService());
locator.registerLazySingleton(() => ReferredPatientService());
locator.registerLazySingleton(() => MedicineService());
locator.registerLazySingleton(() => PatientService());
4 years ago
locator.registerLazySingleton(() => DashboardService());
locator.registerLazySingleton(() => SickLeaveService());
locator.registerLazySingleton(() => SOAPService());
locator.registerLazySingleton(() => PatientReferralService());
locator.registerLazySingleton(() => PrescriptionService());
locator.registerLazySingleton(() => ProcedureService());
locator.registerLazySingleton(() => VitalSignsService());
4 years ago
locator.registerLazySingleton(() => MedicalFileService());
locator.registerLazySingleton(() => AdmissionRequestService());
4 years ago
locator.registerLazySingleton(() => UcafService());
4 years ago
locator.registerLazySingleton(() => AuthService());
4 years ago
locator.registerLazySingleton(() => PatientMuseService());
locator.registerLazySingleton(() => LabsService());
locator.registerLazySingleton(() => InsuranceCardService());
locator.registerLazySingleton(() => RadiologyService());
locator.registerLazySingleton(() => PrescriptionsService());
locator.registerLazySingleton(() => ReferralService());
locator.registerLazySingleton(() => MyReferralInPatientService());
locator.registerLazySingleton(() => DischargedPatientService());
4 years ago
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
4 years ago
locator.registerFactory(() => IMEIViewModel());
locator.registerFactory(() => ScheduleViewModel());
locator.registerFactory(() => ReferralPatientViewModel());
locator.registerFactory(() => ReferredPatientViewModel());
locator.registerFactory(() => MedicineViewModel());
locator.registerFactory(() => PatientViewModel());
4 years ago
locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => SickLeaveViewModel());
locator.registerFactory(() => SOAPViewModel());
locator.registerFactory(() => PatientReferralViewModel());
locator.registerFactory(() => PrescriptionViewModel());
locator.registerFactory(() => ProcedureViewModel());
locator.registerFactory(() => VitalSignsViewModel());
locator.registerFactory(() => AdmissionRequestViewModel());
4 years ago
locator.registerFactory(() => UcafViewModel());
4 years ago
locator.registerFactory(() => MedicalFileViewModel());
4 years ago
locator.registerFactory(() => PatientMuseViewModel());
locator.registerFactory(() => LabsViewModel());
locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => RadiologyViewModel());
locator.registerFactory(() => PrescriptionsViewModel());
locator.registerFactory(() => DischargedPatientViewModel());
locator.registerFactory(() => PatientSearchViewModel());
4 years ago
}