我使用联系服务更新我的联系人,但它不起作用,联系电话被删除。我使用联系服务 contacts_service: ^0.4.6
Future updateContact(Contact contact, part) async{
Iterable<Item> phones = contact.phones;
List newPhones = [];
for(var phone in phones){
String newPhone;
if(part == 0) newPhone = "22489653214";
else newPhone = "22489653214";
newPhones.add(Item(label: phone.label, value: newPhone));
}
contact.phones = newPhones.map((e) => e);
await ContactsService.updateContact(contact);
}