app_binding.dart 1.1 KB

123456789101112131415161718192021222324252627
  1. //
  2. // import 'package:domain/constants/api_constants.dart';
  3. // import 'package:domain/repository/auth_repository.dart';
  4. // import 'package:get/get.dart';
  5. // import 'package:cpt_auth/intercept/interceptor_status_code_dio.dart';
  6. // import 'package:plugin_basic/service/user_service.dart';
  7. // import 'package:plugin_platform/http/http_provider.dart';
  8. //
  9. // ///异步注入构造方法中的对象 用于Api网络请求相关的注入
  10. // ///主要是在App初始化的时候就注入到依赖注入的池里面,并单例持久化
  11. // class AppBinding extends Bindings {
  12. // @override
  13. // void dependencies() async {
  14. // Get.put(HttpProvider(ApiConstants.baseUrl, interceptors: [StatusCodeDioInterceptors()]), permanent: true);
  15. //
  16. // Get.put(AuthRepository(httpProvider: Get.find()));
  17. //
  18. // // 用户信息服务(用户信息相关业务类)
  19. // Get.put(UserService(Get.find()));
  20. // // Get.lazyPut(() => WXPlatformService());
  21. // // Get.lazyPut(() => QQPlatformService());
  22. // // Get.lazyPut(() => JVerifyService());
  23. //
  24. // // Get.lazyPut<ProfileService>(() => ProfileServiceImpl());
  25. // }
  26. // }