判断是否存在key的数据
static bool hasKey(String? key) { if (key == null || key.isEmpty) { return false; } return _preferences.getKeys().contains(key); }