InMemoryStorage class

In-memory storage for testing purposes.

This implementation stores data in memory and is useful for unit tests where persistent storage is not needed.

Note: Data is lost when the object is garbage collected.

Implemented types

Constructors

InMemoryStorage()

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

containsKey(String key) Future<bool>
Checks if a key exists.
override
delete(String key) Future<void>
Deletes a value from storage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String key) Future<String?>
Reads a value from storage.
override
toString() String
A string representation of this object.
inherited
write(String key, String value) Future<void>
Writes a value to storage.
override

Operators

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