KeyValueStore class

A key-value store.

Keys are Strings. Accepts int, double, bool and String values.

It uses shared_preferences package under the hood.

Constructors

KeyValueStore(SharedPreferences _sharedPreferences, [String _prefix = 'alba'])
Creates an KeyValueStore instance.

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

get<T>(String key) Future<T>
Retrieve a value by key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key) Future<void>
Removes a value by key.
set<T extends Object>(String key, T value) Future<void>
Saves or replaces a value for a key.
toString() String
A string representation of this object.
inherited

Operators

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