getBool static method

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

获取布尔值 使用示例 void example() { SharepUtil.getBool('key'); } 返回:true

Implementation

static bool getBool(String key, {bool defaultValue = false}) {
  return _prefs?.getBool(key) ?? defaultValue;
}