SingleElementPreferencesRepository<T> class

SingleElementPreferencesRepository that takes SharedPreferences directly. Be aware that SharedPreferences.getInstance() returns Future so you have to wait for that to complete (eg. during your app startup) to be able to use this class! If you don't want to do this, just use FutureSingleElementPreferencesRepository This is simplified version of PreferencesRepository which only stores one value.

Constructors

SingleElementPreferencesRepository(SharedPreferences prefs, DesSer<T> desSer)

Properties

desSer DesSer<T>
finalinherited
hashCode int
The hash code for this object.
no setterinherited
prefs → SharedPreferences
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

find() → T?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
save(T t) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited