This package uses IOWebSocketChannel, which unfortunately does not work with web. (The exception "Unsupported operation: Platform._version" gets thrown.
The workaround is to use WebSocketChannel which then determines whether to use IOWebSocketChannel or HTMLWebSocketChannel based on platform.
The downside to this solution is that headers cannot be included in the connection as there isn't an adequate standardization of handling headers across browsers.
This package uses IOWebSocketChannel, which unfortunately does not work with web. (The exception "Unsupported operation: Platform._version" gets thrown.
The workaround is to use WebSocketChannel which then determines whether to use IOWebSocketChannel or HTMLWebSocketChannel based on platform.
The downside to this solution is that headers cannot be included in the connection as there isn't an adequate standardization of handling headers across browsers.