SharedPrefsStorage<E> class
abstract
Storage
implementation that uses SharedPreferences
to store items.
Constructors
-
Makes a new instance using the provided
fromMap
andtoMap
item converters,itemKey
as key in thesharedPreferences
instance.factory -
Storage
implementation that usesSharedPreferences
to store primitive items that don't need a converter.factory
Properties
Methods
-
delete(
) → Future< void> -
Deletes any written item. If no item is found completes without error.
override
-
ensurePreferencesSet(
) → Future< SharedPreferences> -
get(
) → Future< E?> -
Retrieves the saved item or returns
null
if no item is found.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
E item) → Future< E> -
Saves the given item, overriding any previous entries.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited