newHealthElementDelegations method

Future<DecryptedHealthElementDto?> newHealthElementDelegations(
  1. UserDto user,
  2. String healthElementId,
  3. List<DelegationDto> delegations,
  4. CryptoConfig<DecryptedHealthElementDto, HealthElementDto> config,
)

Implementation

Future<DecryptedHealthElementDto?> newHealthElementDelegations(UserDto user, String healthElementId, List<DelegationDto> delegations,
    CryptoConfig<DecryptedHealthElementDto, HealthElementDto> config) async {
  final HealthElementDto? newHealthElement = await this.rawNewHealthElementDelegations(healthElementId, delegations);
  return newHealthElement != null ? await config.decryptHealthElement(user.dataOwnerId()!, newHealthElement) : null;
}