static void setJson(String key, Map<String, dynamic> map) { final str = jsonEncode(map); _prefs?.setString(key, str); }