read method

  1. @override
Future<String?> read(
  1. String handle, {
  2. required String reason,
})
override

The secret under handle after the OS check, which shows reason; null when nothing is stored there (no prompt then). Throws TomGatedSecretStoreException when the check fails or is cancelled.

Implementation

@override
Future<String?> read(String handle, {required String reason}) async {
  final item = _items[handle];
  if (item == null) return null;
  _prompt(reason);
  return item.secret;
}