operator [] method Null safety

Stream<WebSocketEvent> operator [](
  1. String index
)

Implementation

Stream<WebSocketEvent> operator [](String index) {
  if (_events[index] == null) {
    _events[index] = StreamController<WebSocketEvent>();
  }

  return _events[index]!.stream;
}