SettingsStorage class abstract

Abstract interface for settings storage.

Implement this interface to provide a custom storage backend. The framework provides a SharedPreferencesStorage implementation and an in-memory MemoryStorage for testing.

Implementers

Constructors

SettingsStorage()

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

clear() → Future<bool>
Clear all values.
containsKey(String key) → bool
Check if a key exists.
getBool(String key) → bool?
Get a boolean value.
getDouble(String key) → double?
Get a double value.
getInt(String key) → int?
Get an integer value.
getKeys() → Set<String>
Get all keys.
getString(String key) → String?
Get a string value.
getStringList(String key) → List<String>?
Get a string list value.
init() → Future<void>
Initialize the storage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() → Future<void>
Reload from storage (for platforms that cache).
remove(String key) → Future<bool>
Remove a value.
setBool(String key, bool value) → Future<bool>
Set a boolean value.
setDouble(String key, double value) → Future<bool>
Set a double value.
setInt(String key, int value) → Future<bool>
Set an integer value.
setString(String key, String value) → Future<bool>
Set a string value.
setStringList(String key, List<String> value) → Future<bool>
Set a string list value.
toString() → String
A string representation of this object.
inherited

Operators

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