getConnectionState method Null safety

Future<int> getConnectionState()

Gets the connection state of a channel

For information about connection states, see NERtcConnectionState.

Implementation

Future<int> getConnectionState() async {
  IntValue reply = await _api.getConnectionState();
  return reply.value ?? -1;
}