OTPublishersNativeSDK class

Constructors

OTPublishersNativeSDK()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

clearOTSDKData() → void
Clear OneTrust SDK Data saved locally
getAgeGatePromptValue() Future<int?>
Returns an int? with the resulting prompt value
getATTrackingAuthorizationStatus() Future<OTATTrackingAuthorizationStatus>
getBannerData() Future<Map<String, dynamic>?>
returns a Map<String,dynamic> which contains all the keys required to render a banner
getCachedIdentifier() Future<String?>
getCommonData() Future<Map<String, dynamic>?>
returns a Map<String,dynamic> which contains template based information like branding which includes keys for determining colors and styles in the UI specific to a template configured for the user's geolocation along with consent logging information.
getConsentStatusForCategory(String categoryId) Future<int>
Returns the consent status for the inputted category; 0 = consent not given, 1 = consent given, -1 = invalid category, or SDK not yet initialized.
getConsentStatusForSDK(String sdkId) Future<int>
Returns the consent status for the input SDK; 0 = consent not given, 1 = consent given, -1 = invalid SDKID.
getCurrentActiveProfile() Future<String?>
getDomainGroupData() Future<Map<String, dynamic>?>
returns a Map<String,dynamic> containing the information about all the categories and sdk IDs specific to a template configured for the user's geolocation.
getDomainInfo() Future<Map<String, dynamic>?>
returns a Map<String,dynamic> containing all the information about the domain (application) including rulesets and template configurations.
getLastDataDownloadedLocation() Future<Map<String, dynamic>?>
returns a Map<String,dynamic> which contains the last data download country code and state code
getOTConsentJSForWebView() Future<String?>
getPreferenceCenterData() Future<Map<String, dynamic>?>
returns a Map<String,dynamic> which contains all the keys required to render a Preference Center.
getUCPurposeConsent(String purposeID) Future<int>
Returns the consent status for the given UC Purpose; 0 = consent not given, 1 = consent given, -1 = invalid Purpose.
getUCPurposeCustomPreferenceOptionConsent(String customPreferenceOptionID, String customPreferenceID, String purposeID) Future<int>
getUCPurposeTopicConsent(String topicID, String purposeID) Future<int>
getVendorDetails(String vendorID, VendorListMode mode) Future<Map<String, dynamic>?>
listenForConsentChanges(List<String> categoryIds) Stream
Starts listening for consent changes for the category IDs inputted
listenForUIInteractions() Stream
renameProfile(String? fromIdentifier, String toIdentifier) Future<bool>
Rename Profile
resetUpdatedConsent() → void
Unstages any pending consent. For example, if a user closes out of a preference center without hitting save, this should be called to clear out the choices they made in order to abandon them
saveConsent(OTInteractionType interactionType) → void
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.
setLogLevel(OTLogLevel logLevel) → void
shouldShowBanner() Future<bool>
Determines whether or not a banner should be shown, based on settings in the OneTrust tenant & whether or not consent was gathered already.
showBannerUI() → void
Shows the banner atop the current view
showConsentUI(OTDevicePermission permissionType) Future<int?>
Show Consent UIs for Age Gate, IDFA Returns int? with the resulting value of the prompt
showPreferenceCenterUI() → void
Shows the preference center atop the current view
showUCPurposesUI() → void
Shows the UCPurposes view atop the current view
startSDK(String storageLocation, String domainIdentifier, String languageCode, [Map<String, String>? otInitParams]) Future<bool>
updatePurposeConsent(String categoryId, bool consentValue) → void
Used to programmatically update a user's consent for a specific category
updateUCPurposeConsent(String purposeId, bool consentValue) → void
updateUCPurposeCutomPreferenceOptionConsent(String cpOptionId, String cpId, String purposeId, bool consentValue) → void
updateUCPurposeTopicConsent(String topicId, String purposeId, bool consentValue) → void