hasKey static method

bool hasKey(
  1. String? key
)

判断是否存在key的数据

Implementation

static bool hasKey(String? key) {
  if (key == null || key.isEmpty) {
    return false;
  }
  return _preferences.getKeys().contains(key);
}