IOWebSocketChannel constructor Null safety

IOWebSocketChannel(
  1. WebSocket socket
)

Creates a channel wrapping socket.

Implementation

IOWebSocketChannel(WebSocket socket)
    : _webSocket = socket,
      stream = socket.handleError(
          (error) => throw WebSocketChannelException.from(error)),
      sink = _IOWebSocketSink(socket);