This commit is contained in:
2025-10-10 22:49:05 +07:00
parent 02941e2234
commit 38c16bf0b9
49 changed files with 2702 additions and 740 deletions

View File

@@ -0,0 +1,23 @@
import 'package:riverpod_annotation/riverpod_annotation.dart';
import '../network/dio_client.dart';
import '../storage/secure_storage.dart';
part 'core_providers.g.dart';
/// Provider for DioClient (singleton)
///
/// This is the global HTTP client used across the entire app.
/// It's configured with interceptors, timeout settings, and auth token injection.
@Riverpod(keepAlive: true)
DioClient dioClient(Ref ref) {
return DioClient();
}
/// Provider for SecureStorage (singleton)
///
/// This is the global secure storage used for storing sensitive data like tokens.
/// Uses platform-specific secure storage (Keychain on iOS, EncryptedSharedPreferences on Android).
@Riverpod(keepAlive: true)
SecureStorage secureStorage(Ref ref) {
return SecureStorage();
}