setParticipantList method

dynamic setParticipantList(
  1. List<UserModel> participantList
)

Implementation

setParticipantList(List<UserModel> participantList){

  if(participantsLists.isNotEmpty) {
    participantsLists.clear();
  }

  if (participantList.isNotEmpty) {
    for (var model in participantList) {
      Map<String, dynamic> user = {
        'clientId': model.clientId,
        'role': model.role,
        'name': model.name,

      };

      participantsLists.add(user);

    }

  }

 // participantsLists.addAll(participantsList);

}