modifyContact method
Future<DecryptedContactDto?>
modifyContact(
- UserDto user,
- DecryptedContactDto contact,
- CryptoConfig<
DecryptedContactDto, ContactDto> config
Implementation
Future<DecryptedContactDto?> modifyContact(UserDto user, DecryptedContactDto contact, CryptoConfig<DecryptedContactDto, ContactDto> config) async {
var newContact = await this.rawModifyContact(await config.encryptContact(
user.dataOwnerId()!, <String>{...(user.autoDelegations["all"] ?? {}), ...(user.autoDelegations["medicalInformation"] ?? {})}, contact));
return newContact == null ? null : await config.decryptContact(user.dataOwnerId()!, newContact);
}