markFavContact method
add/remove contact
from faviorite list.
Implementation
Future<bool> markFavContact(AtContact contact) async {
try {
contact.favourite = !contact.favourite!;
var res = await atContactImpl.update(contact);
if (res) {
await fetchBlockContactList();
await fetchContacts();
return res;
} else {
return false;
}
} catch (error) {
print('error in marking fav: $error');
return false;
}
}