initCreateRoomState method

void initCreateRoomState(
  1. String roomId,
  2. String roomName,
  3. TUISeatMode seatMode,
  4. int maxSeatCount,
)

Implementation

void initCreateRoomState(String roomId, String roomName, TUISeatMode seatMode, int maxSeatCount) {
  roomState.roomId = roomId;
  roomState.roomName.value = roomName;
  roomState.seatMode.value = seatMode;
  roomState.maxSeatCount.value = maxSeatCount;
  roomState.createTime = DateTime.now().millisecondsSinceEpoch;
  roomState.ownerInfo.userId = userState.selfInfo.userId;
  roomState.ownerInfo.name.value = userState.selfInfo.name.value;
  roomState.ownerInfo.avatarUrl.value = userState.selfInfo.avatarUrl.value;
  userState.selfInfo.role.value = TUIRole.roomOwner;
}