MemoryStorage class

Zero-setup, single-process StorageAdapter backed by a plain Map.

This is the default storage backend for every layer that accepts a storage parameter. It has no external dependencies and is ideal for local development, tests, and single-instance deployments. State is lost on restart and is not shared across instances — for multi-instance production deployments, use a shared backend such as RedisStorage.

Implemented types

Constructors

MemoryStorage()

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
Test/inspection helper: the number of keys currently stored.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Test/inspection helper: clears all stored state.
delete(String key) Future<void>
Removes the value stored under key, if any.
override
get(String key) Future
Retrieves the value stored under key, or null if absent.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(String key, dynamic value) Future<void>
Stores value under key, overwriting any existing value.
override
toString() String
A string representation of this object.
inherited

Operators

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