12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import 'package:get/get.dart';
- import 'package:router/componentRouter/auth_service.dart';
- import 'package:router/componentRouter/job_sg_service.dart';
- import 'package:router/componentRouter/labour_service.dart';
- import 'package:router/componentRouter/labour_sg_service.dart';
- import 'job_service.dart';
- import 'report_service.dart';
- /**
- * 全局的组件路由服务,记得在 main.dart 中注入
- */
- class ComponentRouterServices{
- static final ComponentRouterServices _instance = ComponentRouterServices._internal();
- factory ComponentRouterServices() {
- return _instance;
- }
- ComponentRouterServices._internal();
- //获取 Labour 组件的服务
- static LabourService get labourService => Get.find();
- //获取 Job 组件的服务
- static JobService get jobService => Get.find();
- //获取 Report 组件的服务
- static ReportService get reportService => Get.find();
- //获取 Auth 组件服务
- static AuthService get authService => Get.find();
- //获取 Job 组件的服务 (新加坡)
- static JobSGService get jobSGService => Get.find();
- //获取 Labour 组件的服务 (新加坡)
- static LabourSGService get labourSGService => Get.find();
- }
|