|
|
|
|
import 'package:doctor_app_flutter/core/service/patient_service.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
|
|
|
|
import 'package:get_it/get_it.dart';
|
|
|
|
|
|
|
|
|
|
import 'core/service/doctor_reply_service.dart';
|
|
|
|
|
import 'core/service/medicine_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/doctor_replay_view_model.dart';
|
|
|
|
|
import 'core/viewModel/medicine_view_model.dart';
|
|
|
|
|
import 'core/viewModel/referral_view_model.dart';
|
|
|
|
|
import 'core/viewModel/referred_view_model.dart';
|
|
|
|
|
import 'core/viewModel/schedule_view_model.dart';
|
|
|
|
|
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
|
|
/// View Model
|
|
|
|
|
locator.registerFactory(() => DoctorReplayViewModel());
|
|
|
|
|
locator.registerFactory(() => ScheduleViewModel());
|
|
|
|
|
locator.registerFactory(() => ReferralPatientViewModel());
|
|
|
|
|
locator.registerFactory(() => ReferredPatientViewModel());
|
|
|
|
|
locator.registerFactory(() => MedicineViewModel());
|
|
|
|
|
locator.registerFactory(() => PatientViewModel());
|
|
|
|
|
}
|