import 'package:get/get.dart'; import 'package:router/componentRouter/auth_service.dart'; import 'package:router/componentRouter/uk_service.dart'; import 'package:router/componentRouter/vn_service.dart'; import 'sg_service.dart'; /* * 全局的组件路由服务,记得在 main.dart 中注入 */ class ComponentRouterServices{ static final ComponentRouterServices _instance = ComponentRouterServices._internal(); factory ComponentRouterServices() { return _instance; } ComponentRouterServices._internal(); //获取 Auth 组件服务 static AuthService get authService => Get.find(); //获取 SG 组件服务(新加坡) static SGService get sgService => Get.find(); //获取 UK 组件服务(英国) static UKService get ukService => Get.find(); //获取 VN 组件服务(越南) static VNService get vnService => Get.find(); }