compute<Result> static method

Result compute<Result>(
  1. RefComputer<Result> computeCallback
)

Returns the provided RefComputer's output and triggers a rebuild when any of the values referenced by ComputeRef.watch change.

Implementation

static Result compute<Result>(RefComputer<Result> computeCallback) {
  return use(
    _RefComputerHook.new,
    key: null,
    data: computeCallback,
    debugLabel: 'compute<$Result>',
  );
}