call method

Future<QBRTCSession?> call(
  1. List<int> opponentsIds,
  2. int sessionType, {
  3. Map<String, Object>? userInfo,
})

Implementation

Future<QBRTCSession?> call(List<int> opponentsIds, int sessionType, {Map<String, Object>? userInfo}) async {
  Map<String, Object> values = Map();

  values["opponentsIds"] = opponentsIds;
  values["type"] = sessionType;

  if (userInfo != null) {
    values["userInfo"] = userInfo;
  }

  Map<Object?, Object?> map = await _webRtcModule.invokeMethod(CALL_METHOD, values);

  QBRTCSession? qbSession = QBRTCSessionMapper.mapToQBRtcSession(map);

  return qbSession;
}