getEmptySeats method

List<int> getEmptySeats({
  1. bool includeHostSeats = false,
})

get the currently empty seat

set includeHostSeats to true if ZegoLiveAudioRoomSeatConfig.hostIndexes is included, default does not include

Implementation

List<int> getEmptySeats({
  bool includeHostSeats = false,
}) {
  var emptySeats = private.seatManager?.getEmptySeats() ?? [];
  if (!includeHostSeats) {
    emptySeats.removeWhere(
        (seatIndex) => private.seatManager?.isAHostSeat(seatIndex) ?? false);
  }
  return emptySeats;
}