modifyConsent method Null safety

Future<ConsentModel> modifyConsent(
  1. String ownershipId,
  2. TikiSdkDestination destination,
  3. {String? about,
  4. String? reward,
  5. DateTime? expiry}
)

Modify consent for an ownership identified by ownershipId.

The Ownership must be granted before modifying consent. Consent is applied on an explicit only basis. Meaning all requests will be denied by default unless the destination is explicitly defined in destination. A blank list of TikiSdkDestination.uses or TikiSdkDestination.paths means revoked consent.

Implementation

Future<ConsentModel> modifyConsent(
    String ownershipId, TikiSdkDestination destination,
    {String? about, String? reward, DateTime? expiry}) async {
  ConsentModel consentModel = await _consentService.modify(
      Bytes.base64UrlDecode(ownershipId),
      destination: destination,
      about: about,
      reward: reward,
      expiry: expiry);
  return consentModel;
}