start method

  1. @override
Future<TUIValueCallBack<TUIRoomInfo>> start(
  1. TUIRoomInfo roomInfo
)
override

Implementation

@override
Future<TUIValueCallBack<TUIRoomInfo>> start(TUIRoomInfo roomInfo) async {
  final result = await roomEngine.createRoom(roomInfo);
  if (result.code == TUIError.success) {
    return roomEngine.enterRoom(roomInfo.roomId, roomType: TUIRoomType.livingRoom);
  }
  return TUIValueCallBack(code: TUIError.errFailed, message: "failed");
}