build property

  1. @override
FutureOr<T> Function() get build
override

Execute all registered plugins, passing the result of all previous ones as input.

Implementation

@override
FutureOr<T> Function() get build {
  return () {
    final sequential = Sequential();
    final previousOutputs = <T>[];
    for (final plugin in plugins) {
      sequential.add(
        (e) => consec(
          plugin.execute(previousOutputs),
          (e) => previousOutputs.add(e),
        ),
      );
    }
    return previousOutputs.last;
  };
}