ComputeOnce<V> constructor

ComputeOnce<V>(
  1. ComputeOnceCall<V> call, {
  2. bool resolve = true,
})

Creates a ComputeOnce wrapping _call.

If resolve is true, starts resolving immediately.

Implementation

ComputeOnce(ComputeOnceCall<V> call, {bool resolve = true}) : _call = call {
  if (resolve) {
    resolveAsync();
  }
}