participants method

List<Participant> participants(
  1. List participantsArray
)

Implementation

List<Participant> participants(List participantsArray) {
  List<Participant> participants = [];

  for (final participantDict in participantsArray) {

    MediaState mediaState = MediaState(participantDict[_kVideoEnabled], participantDict[_kAudioEnabled], participantDict[_kScreenEnabled]);
    Participant p = Participant(participantDict[_kParticipantId], participantDict[_kParticipantName], participantDict[_kTextureId], mediaState);
    participants.add(p);
  }

  return participants;
}