getProducerWithLabel method

Producer? getProducerWithLabel(
  1. String label
)

Returns the producer with the given label @param label - Identifier of the producer @returns { Producer } Producer @returns { null } If the producer is not found

Implementation

Producer? getProducerWithLabel(String label) {
  try {
    final producerId = labelToProducerId[label];
    if (producerId != null) {
      final producer = _producers[producerId];
      return producer;
    }
    return null;
  } catch (error) {
    logger
        .e('❌ Cannot Find Producer With Identifier: $label | error: $error');
    return null;
  }
}