SharedPrefsStorage class

A PrefsStorage that stores the data in platform-dependent SharedPreferences.

Inheritance

Constructors

SharedPrefsStorage()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sp Future<SharedPreferences>
final

Methods

getBool(String key) Future<bool?>
Reads named value from the storage. Returns the read value or null if value does not exist.
override
getDateTime(String key) Future<DateTime?>
Reads named DateTime from to the storage. Returns the read value or null if value does not exist.
inherited
getDouble(String key) Future<double?>
Reads named value from the storage. Returns the read value or null if value does not exist.
override
getInt(String key) Future<int?>
Reads named value from the storage. Returns the read value or null if value does not exist.
override
getKeys(String key) Future<Set<String>>
override
getString(String key) Future<String?>
Reads named value from the storage. Returns the read value or null if value does not exist.
override
getStringList(String key) Future<List<String>?>
Reads named value from the storage. Returns the read value or null if value does not exist.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBool(String key, bool? value) Future<void>
Writes named value to the storage.
override
setDateTime(String key, DateTime? value) Future<void>
Writes named DateTime value to the storage.
inherited
setDouble(String key, double? value) Future<void>
Writes named value to the storage.
override
setInt(String key, int? value) Future<void>
Writes named value to the storage.
override
setString(String key, String? value) Future<void>
Writes named value to the storage.
override
setStringList(String key, List<String>? value) Future<void>
Writes named value to the storage.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

withTestingFallback() Future<PrefsStorage>