save method

Future<bool> save(
  1. String name,
  2. String value
)

Writes value through to the store and updates the snapshot. Returns false when the store is unavailable OR the write fails (locked or MDM-managed keychain, missing Secret Service provider) — a failing backend must degrade to session-only, never crash the CLI.

Implementation

Future<bool> save(String name, String value) async {
  if (!available) return false;
  try {
    await _store!.write(name, value);
  } on Object {
    return false;
  }
  _snapshot[name] = value;
  return true;
}