setString static method

void setString(
  1. String key,
  2. String value
)

Sets a string value in storage synchronously. Note: The actual write to disk happens asynchronously in the background.

Implementation

static void setString(String key, String value) {
  _ensureInitialized();
  _prefs!.setString(key, value);
}