putBool static method

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

put bool. 存储sp中key的布尔值

Implementation

static Future<bool>? putBool(String key, bool value) {
  if (_prefs == null) {
    return null;
    // return Future.value(false);
  }
  return _prefs?.setBool(key, value);
}