removeHandler method

void removeHandler(
  1. String type,
  2. ProtocolMessageHandler handler
)

Implementation

void removeHandler(String type, ProtocolMessageHandler handler) {
  final current = handlers[type];
  if (!identical(current, handler)) {
    throw StateError('handler mismatch for $type');
  }
  handlers.remove(type);
}