storeValue method
Store value with optional biometric protection
Implementation
Future<void> storeValue(String key, String value, {bool requireBiometrics = false}) async {
try {
if (requireBiometrics && await _isBiometricsAvailable()) {
final authenticated = await _authenticateWithBiometrics('Store secure value');
if (!authenticated) {
throw Exception('Biometric authentication required');
}
}
await _secureStorage.write(key: key, value: value);
OnairosDebugHelper.log('✅ Value stored: $key');
} catch (e) {
OnairosDebugHelper.log('❌ Error storing value: $e');
rethrow;
}
}