rtcEngine$onConnectionStateChanged method
@detail callback @author hanchenchen.c @brief SDK connection state change callback with signaling server. Triggered when the connection state changes. @param engine ByteRTCEngine object @param state The current connection status between the SDK and the signaling server. See ByteRTCConnectionState{@link #ByteRTCConnectionState}. @note Refer to Getting Connection Status for more details.
Implementation
FutureOr<void> rtcEngine$onConnectionStateChanged(
dynamic engine, dynamic state) async {
if ($instance == null || $instance is! IRTCEngineEventHandler) {
return;
}
return ($instance as IRTCEngineEventHandler).onConnectionStateChanged?.call(
int.tryParse(state.toString()) ?? 0,
int.tryParse(state.toString()) ?? 0);
}