getKeyValueInfo static method
Return a map containing the keys currently stored on the
SharedPreferences
and its values.
Implementation
static Map<String, dynamic> getKeyValueInfo() {
Map<String, dynamic> keyValueMap = {};
final keys = sharedPreferences.getKeys();
keys.forEach((key) {
keyValueMap.putIfAbsent(key, () => sharedPreferences.get(key));
});
return keyValueMap;
}