You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:problem_check_system/data/repositories/auth_repository.dart';
|
|
|
|
import 'package:problem_check_system/modules/auth/controllers/auth_controller.dart';
|
|
|
|
|
|
|
|
class AuthBinding implements Bindings {
|
|
|
|
@override
|
|
|
|
void dependencies() {
|
|
|
|
// 2. 注入控制器 (AuthController),它依赖于 AuthProvider
|
|
|
|
// 控制器通过 Get.find() 获取已注入的依赖
|
|
|
|
Get.lazyPut<AuthController>(
|
|
|
|
() => AuthController(authRepository: Get.find<AuthRepository>()),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|