onConnectionStateChange method

void onConnectionStateChange(
  1. void callback(
    1. ConnectionStateChange? state
    )
)

Callback that is fired whenever the connection state of the connection changes. The state typically changes during connection to Pusher and during disconnection and reconnection.

Implementation

void onConnectionStateChange(
    void Function(ConnectionStateChange? state) callback) {
  _onConnectionStateChange = callback;
}