fix : change app architecture
feat : add some method to local storage
This commit is contained in:
23
packages/auth/lib/data/di/auth_di.dart
Normal file
23
packages/auth/lib/data/di/auth_di.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:auths/data/common/constant.dart';
|
||||
import 'package:auths/data/repositories/auth_repository_imp.dart';
|
||||
import 'package:auths/data/services/auth_service.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../common/dio_manager.dart';
|
||||
|
||||
GetIt diAuth = GetIt.instance;
|
||||
|
||||
Future<void> setupAuthDI() async {
|
||||
diAuth.registerLazySingleton(() => DioRemoteManager());
|
||||
|
||||
final manager = diAuth.get<DioRemoteManager>();
|
||||
final dioRemote = manager.setEnvironment(ApiEnvironment.dam);
|
||||
|
||||
diAuth.registerLazySingleton<AuthRepositoryImpl>(
|
||||
() => AuthRepositoryImpl(dioRemote),
|
||||
);
|
||||
diAuth.registerLazySingleton(() => AuthService());
|
||||
|
||||
//hive
|
||||
await diAuth.registerCachedFactoryAsync(() async=>await ,)
|
||||
}
|
||||
Reference in New Issue
Block a user