saveConsent static method

void saveConsent(
  1. OTInteractionType interactionType
)

Commits the user's staged consent to local storage and, if configured, sends a consent receipt to OneTrust. Takes an Enum to dictate the type of interaction. All consent updates (updatePurposeConsent) should all be made before calling this method. Calling this method with an Accept All or Reject All interaction type will overwrite the consent as all accepted or all rejected.

Implementation

static void saveConsent(OTInteractionType interactionType) {
  _channel.invokeMethod(
      'saveConsent', {'interactionType': interactionType.index + 1});
}