setBool method

Future<void> setBool(
  1. String prefKey,
  2. bool value
)

Implementation

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