import 'package:get/get.dart'; import 'package:router/componentRouter/profile_service.dart'; import 'auth_service.dart'; import 'mall_service.dart'; /** * 全局的组件路由服务,记得在 main.dart 中注入 */ class ComponentRouterServices{ static final ComponentRouterServices _instance = ComponentRouterServices._internal(); factory ComponentRouterServices() { return _instance; } ComponentRouterServices._internal(); //获取 Profile 组件的服务 static ProfileService get profileService => Get.find(); //获取 Auth 组件的服务 static AuthService get authService => Get.find(); //获取 Mall 组件的服务 static MallService get mallService => Get.find(); }