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

28 lines
1011 B
Dart

4 years ago
import 'package:get_it/get_it.dart';
import 'core/service/doctor_reply_service.dart';
4 years ago
import 'core/service/hospital/hospitals_service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/schedule_service.dart';
import 'core/viewModel/doctor_replay_view_model.dart';
4 years ago
import 'core/viewModel/hospital_view_model.dart';
import 'core/viewModel/referral_view_model.dart';
import 'core/viewModel/schedule_view_model.dart';
4 years ago
GetIt locator = GetIt.instance;
///di
void setupLocator() {
/// Services
locator.registerLazySingleton(() => HospitalService());
locator.registerLazySingleton(() => DoctorReplyService());
locator.registerLazySingleton(() => ScheduleService());
locator.registerLazySingleton(() => ReferralPatientService());
4 years ago
/// View Model
locator.registerFactory(() => HospitalViewModel());
locator.registerFactory(() => DoctorReplayViewModel());
locator.registerFactory(() => ScheduleViewModel());
locator.registerFactory(() => ReferralPatientViewModel());
4 years ago
}