解决依赖注入
This commit is contained in:
@@ -109,7 +109,7 @@ Future<void> init() async {
|
|||||||
/// 5. 状态管理 (Cubit/Bloc)
|
/// 5. 状态管理 (Cubit/Bloc)
|
||||||
sl.registerLazySingleton(() => AppUserCubit()); // AuthCubit 依赖它,必须先注册
|
sl.registerLazySingleton(() => AppUserCubit()); // AuthCubit 依赖它,必须先注册
|
||||||
sl.registerLazySingleton(() => GetDeviceLocationUseCase(sl()));
|
sl.registerLazySingleton(() => GetDeviceLocationUseCase(sl()));
|
||||||
sl.registerLazySingleton(() => DevicesCubit(sl(), sl(), sl()));
|
sl.registerLazySingleton(() => DevicesCubit( sl(), sl(), sl(), sl(), sl()));
|
||||||
sl.registerFactory(() => RemoteControlCubit(sl()));
|
sl.registerFactory(() => RemoteControlCubit(sl()));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user