StateRef<T> class
可读写的状态 (Replay Latest)
- Inheritance
- Available extensions
Constructors
- StateRef(T initialValue, {DisposePolicy disposePolicy = DisposePolicy.keepAlive})
Properties
- disposePolicy → DisposePolicy
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → T
-
final
- key → Object
-
用于依赖追踪的键
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accept<
R> (AtomVisitor< R> visitor) → R -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overrideWith(
T value) → Override< T> - 用于 Scope override
-
select<
R> (R selector(T value), {bool equals(R, R)?}) → Atom< R> -
Available on Atom<
选择单个字段,只在 selector 结果变化时触发 如果提供了T> , provided by the AtomSelect extensionequals,使用自定义比较器 -
selectMany<
R> (List< R Function(T)> selectors) → Atom<List< R> > -
Available on Atom<
选择多个字段,任一变化都触发T> , provided by the AtomSelect extension -
toString(
) → String -
A string representation of this object.
inherited
-
where(
bool predicate(T)) → Atom< T?> -
Available on Atom<
条件过滤,只在条件为 true 时返回值T> , provided by the AtomSelect extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited