call<T> method

T call<T>(
  1. Bloom<T> bloom
)

Scoped watch function that tracks bloom as an upstream dependency and returns its underlying valid data payload of type T.

If bloom is currently in an empty or error state, short-circuits and silently halts the current effect execution turn.

  • bloom: The reactive node to observe within this evaluation epoch.

Implementation

@pragma('vm:prefer-inline')
T call<T>(Bloom<T> bloom) {
  _node._trackDependency(this, bloom);
  final s = bloom._read();
  if (s is _ValidBloomState) {
    return s.data;
  }
  throw _ViaShortCircuit(s);
}