clearListener method Null safety

void clearListener(
  1. String name
)

Clears the listener for the specified channel.

When there is no listener, messages on that channel are queued, up to kDefaultBufferSize (or the size configured via the control channel), and then discarded in a first-in-first-out fashion.

Implementation

void clearListener(String name) {
  final _Channel? channel = _channels[name];
  if (channel != null) {
    channel.clearListener();
  }
}