getConsent method Null safety
- String source,
- {String? origin}
Gets latest consent given for a source
and origin
.
It does not validate if the consent is expired or if it can be applied to a specifi destination. For that, applyConsent should be used instead.
Implementation
ConsentModel? getConsent(String source, {String? origin}) {
OwnershipModel? ownershipModel =
_ownershipService.getBySource(source, origin: origin);
if (ownershipModel == null) return null;
return _consentService.getByOwnershipId(ownershipModel.transactionId!);
}