isConnected property

bool get isConnected

Checks if the WebSocket connection is in a connected state.

Implementation

bool get isConnected {
  return connection.state is Connected;
}