setBool static method

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

存储布尔值 使用示例 void example() { SharepUtil.setBool('key', true); }

Implementation

static Future<void> setBool(String key, bool value) async {
  final prefs = _prefs ?? await init();
  await prefs.setBool(key, value);
}