expectedOutputs function

Iterable<AssetId> expectedOutputs(
  1. Builder builder,
  2. AssetId input
)

Collects the expected AssetIds created by builder when given input based on the extension configuration.

Implementation

Iterable<AssetId> expectedOutputs(Builder builder, AssetId input) sync* {
  for (var parsedExtension in builder._parsedExtensions) {
    var outputs = parsedExtension.matchingOutputsFor(input);
    for (var output in outputs) {
      if (output == input) {
        throw ArgumentError(
          'The builder `$builder` declares an output "$output" which is '
          'identical to its input, which is not allowed.',
        );
      }
      yield output;
    }
  }
}