JsMemoryKvStore class final

适合测试和临时 Session 的内存 KV 实现。

Implemented types

Constructors

JsMemoryKvStore()

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({String? namespace}) Future<void>
清空 namespace 中的全部条目。
override
containsKey(String key, {String? namespace}) Future<bool>
判断 namespace 中是否存在 key
override
get(String key, {String? namespace}) Future<Object?>
读取 namespacekey 对应的值;不存在时返回 null
override
keys({String? namespace}) Future<List<String>>
返回 namespace 中的全部键。
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key, {String? namespace}) Future<void>
namespace 删除 key
override
set(String key, Object? value, {String? namespace}) Future<void>
namespace 中写入 key 对应的 JSON 兼容值。
override
toString() String
A string representation of this object.
inherited

Operators

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