read method

  1. @override
Future<String?> read(
  1. String key, {
  2. String? storageName,
})
override

Reads a value from the secure keystore.

Platform implementations should override this method to provide platform-specific secure storage functionality.

Parameters

  • key - The unique identifier for the stored value
  • storageName - Optional storage name for organizing keys

Returns

Returns the stored value as a String, or null if the key doesn't exist.

Implementation

@override
Future<String?> read(String key, {String? storageName}) async {
  final String? value = await methodChannel.invokeMethod<String?>('read', {
    'key': key,
    'storageName': storageName,
  });
  return value;
}