Update: 2026-05-13 22:58:30

This commit is contained in:
Hamza-Ayed
2026-05-13 22:58:30 +03:00
parent 30da101415
commit 1ca7e01ce0
7 changed files with 227 additions and 22 deletions

View File

@@ -6,6 +6,7 @@ class SecureStorage {
static const String _keyToken = 'jwt_token';
static const String _keyDeviceSecret = 'device_secret';
static const String _keyUserId = 'user_id';
static const String _keyEmail = 'user_email';
Future<void> saveToken(String token) async {
await _storage.write(key: _keyToken, value: token);
@@ -23,6 +24,14 @@ class SecureStorage {
return await _storage.read(key: _keyDeviceSecret);
}
Future<void> saveEmail(String email) async {
await _storage.write(key: _keyEmail, value: email);
}
Future<String?> getEmail() async {
return await _storage.read(key: _keyEmail);
}
Future<void> clearAll() async {
await _storage.deleteAll();
}