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.
driver-app/lib/locator.dart

24 lines
775 B
Dart

import 'package:get_it/get_it.dart';
import 'core/service/authentication_service.dart';
import 'core/service/hospital_service.dart';
import 'core/service/orders_service.dart';
import 'core/viewModels/authentication_view_model.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/orders_view_model.dart';
GetIt locator = GetIt.instance;
///di
void setupLocator() {
/// Services
locator.registerLazySingleton(() => HospitalService());
locator.registerLazySingleton(() => AuthenticationService());
locator.registerLazySingleton(() => OrdersService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
locator.registerFactory(() => AuthenticationViewModel());
locator.registerFactory(() => OrdersViewModel());
}