hasKey static method

bool hasKey(
  1. String key
)

判断是否存在key的数据

Implementation

static bool hasKey(String key) {
  if (_prefs == null) {
    return false;
  }
  Set keys = getKeys()!;
  return keys.contains(key);
}