withSelector method

Selector<T, R> withSelector(
  1. R newSelector(
    1. T
    )
)

Updates the selector function and recomputes the value.

Note: This creates a new selector, the function itself cannot be changed after creation. Use this method carefully as it may break existing dependencies.

Implementation

Selector<T, R> withSelector(R Function(T) newSelector) {
  throwIfDisposed('withSelector');
  return Selector(_source, newSelector);
}