removeOutput method

void removeOutput(
  1. String output
)

Removes an output asset from the graph.

This also updates the outputs map to remove the relationship between the input and output assets.

output is the ID of the output asset to remove.

Implementation

void removeOutput(String output) {
  for (final MapEntry<String, Set<String>> entry in outputs.entries) {
    if (entry.value.contains(output)) {
      entry.value.remove(output);
      if (entry.value.isEmpty) {
        outputs.remove(entry.key);
      }
      break;
    }
  }
}