AtomSelect<T> extension

Selector 增强扩展方法

on

Methods

select<R>(R selector(T value), {bool equals(R, R)?}) Atom<R>

Available on Atom<T>, provided by the AtomSelect extension

选择单个字段,只在 selector 结果变化时触发 如果提供了 equals,使用自定义比较器
selectMany<R>(List<R Function(T)> selectors) Atom<List<R>>

Available on Atom<T>, provided by the AtomSelect extension

选择多个字段,任一变化都触发
where(bool predicate(T)) Atom<T?>

Available on Atom<T>, provided by the AtomSelect extension

条件过滤,只在条件为 true 时返回值