setInt static method

Future setInt({
  1. required String key,
  2. required int value,
})

Implementation

static Future setInt({required String key, required int value}) async {
  final SharedPreferences sharedPreferences =
      await SharedPreferences.getInstance();
  await sharedPreferences.setInt(key, value);
}