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