saveBool static method

Future<bool> saveBool(
  1. String key,
  2. bool? value, [
  3. bool defaultValue = false
])

Implementation

static Future<bool> saveBool(String key, bool? value,
    [bool defaultValue = false]) async {
  final prefs = await SharedPreferences.getInstance();
  return prefs.setBool(key, value ?? defaultValue);
}