setInt static method

void setInt(
  1. String key,
  2. int value
)

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

Implementation

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