getConsumer method

Consumer? getConsumer({
  1. required String label,
  2. required String peerId,
})

Get the consumer by label and peerId @returns Consumer | null; Returns null if consumer is not found

Implementation

Consumer? getConsumer({
  required String label,
  required String peerId,
}) {
  final consumer = _consumers.get(label, peerId);
  if (consumer != null) {
    return consumer;
  } else {
    return null;
  }
}