updateString method

Future<void> updateString(
  1. String key,
  2. String newValue
)

Updates an existing key with a new String value.

Throws StorageException if the key does not exist yet. Use setString if you want an upsert behaviour.

Implementation

Future<void> updateString(String key, String newValue) async {
  _assertExists(key);
  await setString(key, newValue);
}