CmpSDKOptions constructor

CmpSDKOptions({
  1. String appURL = "",
  2. String cdnURL = "",
  3. String tenantID = "",
  4. String appID = "",
  5. bool testingMode = false,
  6. CmpSDKLoggerLevel loggerLevel = CmpSDKLoggerLevel.debug,
  7. int consentsCheckInterval = 1800,
  8. String? subjectId,
  9. String? languageCode,
  10. String? locationCode,
})

Implementation

CmpSDKOptions({
  this.appURL = "",
  this.cdnURL = "",
  this.tenantID = "",
  this.appID = "",
  this.testingMode = false,
  this.loggerLevel = CmpSDKLoggerLevel.debug,
  this.consentsCheckInterval = 1800,
  this.subjectId,
  this.languageCode,
  this.locationCode,
}) {
  // Ensure consentsCheckInterval is at least 60 seconds
  if (consentsCheckInterval < 60) {
    consentsCheckInterval = 60;
  }

  // Convert languageCode to lowercase if not null
  if (languageCode != null) {
    languageCode = languageCode?.toLowerCase();
  }
}