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.
state
The current connection state.reason
The reason for a connection state change.
Implementation
final void Function(RtcConnection connection, ConnectionStateType state,
ConnectionChangedReasonType reason)? onConnectionStateChanged;