onConnectionStateChanged property

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

Callback when the network connection state changes.

This callback is triggered when the network connection state changes and informs the user of the current connection state and the reason for the change.

  • connection Connection information. See RtcConnection.
  • state Current network connection state. See ConnectionStateType.
  • reason Reason for the change in network connection state. See ConnectionChangedReasonType.

Implementation

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