build<T> method

Step<T> build<T>(
  1. FutureOr<T> runStep()
)

Build a step without dependencies.

This methods requires a runStep function which runs the step. The runStep method may be asynchronous. The runStep method will be invoked by Runner.run when the step is evaluated.

This method returns the Step built by the builder, see Step.define for how to define steps using this API.

Implementation

Step<T> build<T>(FutureOr<T> Function() runStep) {
  return Step._(_name, (r, wrap) async {
    return await wrap(() => runStep());
  }, []);
}