isConnected property

bool get isConnected

Returns whether the socket is connected.

If the socket is null, returns false otherwise.

Implementation

bool get isConnected => _socket != null ? _socket!.connected : false;