getValue method
- SharedPreferences preferences,
- String key
override
Retrieve a value associated with the key by using the preferences.
Implementation
@override
T? getValue(SharedPreferences preferences, String key) {
final rawValue = preferences.getString(key);
if (rawValue == null) return null;
return values.firstWhereOrNull((value) => value.name == rawValue);
}