MemoryStorage class
In-memory storage implementation for testing.
This implementation stores all values in memory and does not persist. It's useful for testing and development.
- Implemented types
Constructors
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.
override
-
containsKey(
String key) → bool -
Check if a key exists.
override
-
getAll(
) → Map< String, Object> - Get all data (for testing/debugging).
-
getBool(
String key) → bool? -
Get a boolean value.
override
-
getDouble(
String key) → double? -
Get a double value.
override
-
getInt(
String key) → int? -
Get an integer value.
override
-
getKeys(
) → Set< String> -
Get all keys.
override
-
getString(
String key) → String? -
Get a string value.
override
-
getStringList(
String key) → List< String> ? -
Get a string list value.
override
-
init(
) → Future< void> -
Initialize the storage.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → Future< void> -
Reload from storage (for platforms that cache).
override
-
remove(
String key) → Future< bool> -
Remove a value.
override
-
setAll(
Map< String, Object> values) → void - Set multiple values at once (for testing convenience).
-
setBool(
String key, bool value) → Future< bool> -
Set a boolean value.
override
-
setDouble(
String key, double value) → Future< bool> -
Set a double value.
override
-
setInt(
String key, int value) → Future< bool> -
Set an integer value.
override
-
setString(
String key, String value) → Future< bool> -
Set a string value.
override
-
setStringList(
String key, List< String> value) → Future<bool> -
Set a string list value.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited