fetchGroupsAndContacts method
dynamic
fetchGroupsAndContacts()
Implementation
fetchGroupsAndContacts() async {
try {
allContacts = [];
var contactList = await fetchContacts();
// print('CONT====>$contactList');
contactList.forEach((AtContact? contact) {
allContacts.add(GroupContactsModel(
contact: contact, contactType: ContactsType.CONTACT));
});
await getAllGroupsDetails();
// print('ALL CONTACTS====>${allContacts[8]}');
_allContactsStreamController.add(allContacts);
} catch (e) {
print(e);
}
}