setBool static method

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

添加/获取本地缓存

Implementation

static Future<bool> setBool(String key, bool value) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  return prefs.setBool(key, value);
}