setInt method

Future<void> setInt(
  1. String prefKey,
  2. int value
)

Implementation

Future<void> setInt (String prefKey, int value) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  Pref p = getPref (prefKey);
  if (p != null)
    await prefs.setInt(prefKey, value);
}