setInt static method

Future<bool> setInt(
  1. String? key,
  2. int? value
)

Saves an integer value to persistent storage in the background. Returns null if key is null.

Implementation

static Future<bool> setInt(String? key, int? value) async {
  if (key == null || value == null) {
    return false;
  }
  final prefs = await instance;
  return prefs.setInt(key, value);
}