getBool static method

bool getBool(
  1. String key, {
  2. bool def = false,
})

Implementation

static bool getBool(String key, {bool def = false}) {
  bool val = false;
  if (_memoryPrefs.containsKey(key)) {
    val = _memoryPrefs[key];
  }
  if (val == null) {
    val = _prefs!.getBool(key)!;
  }
  if (val == null) {
    val = def;
  }
  _memoryPrefs[key] = val;
  return val;
}