initContactsService method
Future<void>
initContactsService(
- String rootDomainFromApp,
- int rootPortFromApp, {
- bool fetchContacts = true,
})
Implementation
Future<void> initContactsService(
String rootDomainFromApp, int rootPortFromApp,
{bool fetchContacts = true}) async {
loggedInUserDetails = null;
rootDomain = rootDomainFromApp;
rootPort = rootPortFromApp;
atClientManager = AtClientManager.getInstance();
currentAtsign = atClientManager.atClient.getCurrentAtSign()!;
atContactImpl = await AtContactsImpl.getInstance(currentAtsign);
loggedInUserDetails = await getAtSignDetails(currentAtsign);
if (fetchContacts) {
cachedContactList = await atContactImpl.listContacts();
await fetchContactList();
await fetchBlockContactList();
}
}