updateState method

void updateState(
  1. TUISeatInfo seatInfo
)

Implementation

void updateState(TUISeatInfo seatInfo) {
  index = seatInfo.index;
  userId.value = seatInfo.userId;
  if (seatInfo.userName != null && seatInfo.userName!.isNotEmpty) {
    name.value = seatInfo.userName;
  } else {
    name.value = userId.value;
  }
  avatarUrl.value = seatInfo.avatarUrl;
  isLocked.value = seatInfo.isLocked;
  isAudioLocked.value = seatInfo.isAudioLocked;
}