read method

  1. @override
Future<String?> read(
  1. String key
)
override

Reads an encrypted string value associated with key, or returns null if absent.

Example:

final secret = await secureStorage.read('api_key');

Implementation

@override
Future<String?> read(String key) async {
  try {
    final value = await _storage.read(key: key);
    logger.debug('BloomSecureStorage: Read key "$key" (found: ${value != null})');
    return value;
  } catch (e) {
    logger.error('BloomSecureStorage: Error reading key "$key": $e');
    return null;
  }
}