update api
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import '../../features/auth/data/datasources/auth_remote_datasource.dart';
|
||||
import '../../features/auth/data/repositories/auth_repository_impl.dart';
|
||||
import '../../features/auth/domain/repositories/auth_repository.dart';
|
||||
import '../network/dio_client.dart';
|
||||
import '../network/network_info.dart';
|
||||
import '../storage/secure_storage.dart';
|
||||
|
||||
/// Service locator instance
|
||||
final sl = GetIt.instance;
|
||||
@@ -28,12 +32,33 @@ Future<void> initDependencies() async {
|
||||
() => DioClient(),
|
||||
);
|
||||
|
||||
// Secure Storage
|
||||
sl.registerLazySingleton<SecureStorage>(
|
||||
() => SecureStorage(),
|
||||
);
|
||||
|
||||
// ===== Authentication Feature =====
|
||||
|
||||
// Auth Remote Data Source
|
||||
sl.registerLazySingleton<AuthRemoteDataSource>(
|
||||
() => AuthRemoteDataSourceImpl(dioClient: sl()),
|
||||
);
|
||||
|
||||
// Auth Repository
|
||||
sl.registerLazySingleton<AuthRepository>(
|
||||
() => AuthRepositoryImpl(
|
||||
remoteDataSource: sl(),
|
||||
secureStorage: sl(),
|
||||
dioClient: sl(),
|
||||
),
|
||||
);
|
||||
|
||||
// ===== Data Sources =====
|
||||
// Note: Data sources are managed by Riverpod providers
|
||||
// Note: Other data sources are managed by Riverpod providers
|
||||
// No direct registration needed here
|
||||
|
||||
// ===== Repositories =====
|
||||
// TODO: Register repositories when they are implemented
|
||||
// TODO: Register other repositories when they are implemented
|
||||
|
||||
// ===== Use Cases =====
|
||||
// TODO: Register use cases when they are implemented
|
||||
|
||||
Reference in New Issue
Block a user