updateNewState method

void updateNewState(
  1. SeatInfo newSeatInfo
)

Implementation

void updateNewState(SeatInfo newSeatInfo) {
  index = newSeatInfo.index;
  userId.value = newSeatInfo.userId.value;
  if (newSeatInfo.name.value != null && newSeatInfo.name.value!.isNotEmpty) {
    name.value = newSeatInfo.name.value;
  } else {
    name.value = userId.value;
  }
  avatarUrl.value = newSeatInfo.avatarUrl.value;
  isLocked.value = newSeatInfo.isLocked.value;
  isAudioLocked.value = newSeatInfo.isAudioLocked.value;
}