closeWebSocket method

Future<void> closeWebSocket()

Close the WebSocket and release resources.

Implementation

Future<void> closeWebSocket() async {
  await _wsChannel?.sink.close();
  _cleanupWs();
}