EnumAdapter<T extends Enum> class
Preference adapter that can read and write enum values.
The list of all possible enum values must be provided in values.
Typically, the enum's static values property can be used.
- Inheritance
-
- Object
- PreferenceAdapter<
T> - EnumAdapter
Constructors
-
EnumAdapter(List<
T> values)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ List<
T> -
List of all possible enum values which this adapter can convert.
Typically, the enum's static
valuesproperty can be used.final
Methods
-
getValue(
SharedPreferences preferences, String key) → T? -
Retrieve a value associated with the
keyby using thepreferences.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setValue(
SharedPreferences preferences, String key, T value) → Future< bool> -
Set a
valuefor thekeyby using thepreferences.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited