select<B> method

AtomWithParent<B, Atom<A>> select<B>(
  1. B f(
    1. A value
    )
)

Create a derived atom, that transforms an atoms value using the given function f.

Only rebuilds when the selected value changes.

Implementation

AtomWithParent<B, Atom<A>> select<B>(B Function(A value) f) =>
    AtomWithParent(this, (get, parent) => f(get(parent)));