write method
Future<void>
write(
- String handle,
- String secret, {
- TomGatedLifetime lifetime = TomGatedLifetime.saved,
- String? reason,
override
Stores secret under handle, replacing any current value. A store
whose key exists only after the check (Windows Hello) shows the prompt
with reason here too. Throws TomGatedSecretStoreException.
Implementation
@override
Future<void> write(
String handle,
String secret, {
TomGatedLifetime lifetime = TomGatedLifetime.saved,
String? reason,
}) async {
if (available == TomGatedAvailability.none) {
throw const TomGatedSecretStoreException(
TomGatedSecretErrorKind.unavailable,
);
}
_items[handle] = (secret: secret, lifetime: lifetime);
}