setString method
Saves a String value with the given key.
This method stores a string value in the storage, associating it with the specified key. If a value already exists for this key, it will be replaced.
Parameters:
key- The unique identifier for the string value.value- The string value to store.
Returns a Future that completes when the string has been successfully stored.
Throws:
- ArgumentError if the key invalid.
Implementation
@override
Future<void> setString(String key, String value) async {
validateKey(key);
await backend.setString(key, value);
notifyListeners(key);
}