ComputeOnce<V> constructor

ComputeOnce<V>(
  1. ComputeCall<V> call, {
  2. PosComputeCall<V>? posCompute,
  3. bool resolve = true,
})

Creates a ComputeOnce wrapping _call.

If resolve is true, starts resolving immediately.

Implementation

ComputeOnce(ComputeCall<V> call, {this.posCompute, bool resolve = true})
    : _call = _resolveCall(call) {
  if (resolve) {
    resolveAsync();
  }
}