PreferenceAdapter<T> class
abstract
A PreferenceAdapter knows how to retrieve and store a value associated
with a key by using SharedPreferences
.
For examples, see:
- BoolAdapter, IntAdapter, StringAdapter for simple preference adapters
- DateTimeAdapter and JsonAdapter for more involved preference adapters
Constructors
- PreferenceAdapter()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getValue(
SharedPreferences preferences, String key) → T? -
Retrieve a value associated with the
key
by using thepreferences
. -
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
value
for thekey
by using thepreferences
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited