getGeneratorOfOutput method

String? getGeneratorOfOutput(
  1. String id
)

Returns the ID of the asset that generated a specific output.

id is the ID of the output asset.

Returns null if the asset is not a generated output.

Implementation

String? getGeneratorOfOutput(String id) {
  for (final MapEntry<String, Set<String>> entry in outputs.entries) {
    if (entry.value.contains(id)) {
      return entry.key;
    }
  }
  return null;
}