addNewGroupMembers method

dynamic addNewGroupMembers(
  1. List<AtContact> selectedContactList
)

Implementation

addNewGroupMembers(List<AtContact> selectedContactList) {
  EventService().selectedContacts = [];
  EventService().selectedContactsAtSigns = [];
  EventService().eventNotificationModel!.group!.members = {};

  for (var selectedContact in selectedContactList) {
    EventService().selectedContacts!.add(selectedContact);
    var newContact = getGroupMemberContact(selectedContact);
    EventService().eventNotificationModel!.group!.members!.add(newContact);
    selectedContactsAtSigns.add(newContact.atSign);
  }
}