onConnectionStateChanged property

void Function(RtcConnection connection, ConnectionStateType state, ConnectionChangedReasonType reason)? onConnectionStateChanged
final

Occurs when the network connection state changes.

When the network connection state changes, the SDK triggers this callback and reports the current connection state and the reason for the change.

  • connection The connection information. See RtcConnection.
  • state The current connection state. See ConnectionStateType.
  • reason The reason for a connection state change. See ConnectionChangedReasonType.

Implementation

final void Function(RtcConnection connection, ConnectionStateType state,
    ConnectionChangedReasonType reason)? onConnectionStateChanged;