syncContacts method
void
syncContacts()
Implementation
void syncContacts() async {
if (await Permission.contacts.isGranted) {
if (await AppUtils.isNetConnected() &&
!await Mirrorfly.contactSyncStateValue()) {
final permission = await Permission.contacts.status;
if (permission == PermissionStatus.granted) {
if (SessionManagement.getLogin()) {
Mirrorfly.syncContacts(
!SessionManagement.isInitialContactSyncDone());
}
}
}
} else {
if (SessionManagement.isInitialContactSyncDone()) {
Mirrorfly.revokeContactSync().then((value) {
onContactSyncComplete(true);
mirrorFlyLog("checkContactPermission isSuccess", value.toString());
});
}
}
}