build<T> method
Build a step with a single dependency.
This methods requires a runStep function which runs the step, given
values from evaluation of dependent steps. The runStep method may be
asynchronous. The runStep method will be invoked by Runner.run when
the step is evaluated.
The dependent steps which creates values passed to runStep have
already be defined when this object was created. See Step.define for
how to define steps using this API.
This method returns the Step built by the builder.
Implementation
Step<T> build<T>(FutureOr<T> Function(List<S> values) runStep) =>
Step._(_name, (r, wrap) async {
final values = await Future.wait(_dependencies.map(r.run));
return await wrap(() => runStep(values));
}, [..._dependencies]);