onSeatListChanged method

void onSeatListChanged(
  1. List<TUISeatInfo> seatList,
  2. List<TUISeatInfo> seatedList,
  3. List<TUISeatInfo> leftList
)

Implementation

void onSeatListChanged(List<TUISeatInfo> seatList, List<TUISeatInfo> seatedList, List<TUISeatInfo> leftList) {
  seatState.updateSeatList(seatList);
  for (var info in seatedList) {
    SeatInfo seatInfo = SeatInfo();
    seatInfo.updateState(info);
    if (isSelfSeatInfo(seatInfo)) {
      viewState.linkStatus.value = LinkStatus.linking;
    }
  }

  for (var info in leftList) {
    SeatInfo seatInfo = SeatInfo();
    seatInfo.updateState(info);
    if (isSelfSeatInfo(seatInfo)) {
      viewState.linkStatus.value = LinkStatus.none;
    }
  }
}