12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import 'package:domain/constants/api_constants.dart';
- import 'package:domain/repository/auth_repository.dart';
- import 'package:domain/repository/job_repository.dart';
- import 'package:domain/repository/job_sg_repository.dart';
- import 'package:domain/repository/labour_repository.dart';
- import 'package:domain/repository/labour_sg_repository.dart';
- import 'package:domain/repository/other_repository.dart';
- import 'package:domain/repository/uk_attendance_repository.dart';
- import 'package:domain/repository/uk_job_repository.dart';
- import 'package:domain/repository/uk_report_repository.dart';
- import 'package:domain/repository/uk_review_repository.dart';
- import 'package:plugin_basic/basic_export.dart';
- import 'package:plugin_basic/dio_interceptors/interceptor_auth_dio.dart';
- import 'package:plugin_basic/dio_interceptors/interceptor_status_code_dio.dart';
- import 'package:plugin_basic/service/http_provider_injection.dart';
- import 'package:plugin_basic/service/user_service.dart';
- import 'package:plugin_platform/http/http_provider.dart';
- import 'package:shared/utils/log_utils.dart';
- class GlobalServicesInjection {
-
- static void init({void Function()? additionalDependencies}) {
- Log.d('----ConfigServicesInjection------start-----');
-
- HttpProviderInjection.putHttpProviderByCountry();
-
- Get.put(AuthRepository(httpProvider: Get.find()));
-
- Get.put(UserService(Get.find()));
-
- Get.lazyPut(() => JobRepository(httpProvider: Get.find()));
- Get.lazyPut(() => JobSGRepository(httpProvider: Get.find()));
- Get.lazyPut(() => LabourRepository(httpProvider: Get.find()));
- Get.lazyPut(() => LabourSGRepository(httpProvider: Get.find()));
- Get.lazyPut(() => OtherRepository(httpProvider: Get.find()));
-
- Get.lazyPut(() => UKJobRepository(httpProvider: Get.find()));
- Get.lazyPut(() => UKAttendanceRepository(httpProvider: Get.find()));
- Get.lazyPut(() => UKReviewRepository(httpProvider: Get.find()));
- Get.lazyPut(() => UKReportRepository(httpProvider: Get.find()));
-
- if (additionalDependencies != null) {
- additionalDependencies();
- }
- Log.d('----ConfigServicesInjection------end-----');
- }
- }
|