setConsent method

void setConsent(
  1. bool newValue
)

Implementation

void setConsent(bool newValue) {
  // Update the state for visitor
  _hasConsented = newValue;
  // Update the decision manager
  decisionManager.updateConsent(newValue);
  // Delegate the action to strategy
  _visitorDelegate.setConsent(_hasConsented);
}