enterRoom method

Future<TUIValueCallBack<TUIRoomInfo>> enterRoom(
  1. String roomId,
  2. TUIRoomType roomType,
  3. TUIEnterRoomOptions options
)

Implementation

Future<TUIValueCallBack<TUIRoomInfo>> enterRoom(
    String roomId, TUIRoomType roomType, TUIEnterRoomOptions options) {
  String userData = Tools.generateUserData();
  Completer<TUIValueCallBack<TUIRoomInfo>> completer = Completer();
  _valueCallback2Future<TUIRoomInfo>(userData, completer);
  _engineSDK.Dart_EnterRoom(
      _engineFFIPointer,
      roomType.value(),
      Tools.string2PointerChar(roomId),
      Tools.string2PointerChar(json.encode(options.toJson())),
      Tools.string2PointerChar(userData));
  return completer.future;
}