asyncSelect<V> method

PodFuture<Pod<AsyncValue<T>>, Future<V>> asyncSelect<V>(
  1. V cb(
    1. T value
    )
)

Create a derived pod, that transforms a pod's value using the given function cb.

Only rebuilds when the selected value changes.

Implementation

PodFuture<Pod<AsyncValue<T>>, Future<V>> asyncSelect<V>(
  V Function(T value) cb,
) =>
    select(cb).rawSelect(
      (val) => val.maybeWhen(
        data: Future.value,
        orElse: () => Future.any([]),
      ),
    );