getValue method
Retrieve a value associated with the key
by using the preferences
.
Implementation
@override
T? getValue(SharedPreferences preferences, String key) {
final value = preferences.getString(key);
if (value == null) return null;
final decoded = jsonDecode(value);
return deserializer != null ? deserializer!(decoded) : decoded;
}