ConsentInfo class
Consent information passed from the host app (or its CMP integration) to the SDK.
Every field is independent. Leave a field null/unset if you don't have that signal — the SDK
only overrides a given ad network's own implicit consent detection when the corresponding
field here is non-null (see the SDK's consent integration docs for the per-network precedence
rules). Passing this to updateConsent for one purpose (e.g. only supplying acString) never
clobbers signals you didn't set.
Constructors
-
ConsentInfo({required AdPersonalizationState personalizationState, bool? gdprApplies, String? tcString, String? gppString, List<
int> ? gppApplicableSections, String? acString})
Properties
- acString ↔ String?
-
IAB "Additional Consent" string (used by vendors not on the IAB Global Vendor List, e.g.
Meta Audience Network), if available.
getter/setter pair
- gdprApplies ↔ bool?
-
Whether GDPR applies to this user, if known.
getter/setter pair
-
gppApplicableSections
↔ List<
int> ? -
IAB GPP applicable section IDs, if available.
getter/setter pair
- gppString ↔ String?
-
IAB GPP consent string, if available.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- personalizationState ↔ AdPersonalizationState
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tcString ↔ String?
-
IAB TCF v2 consent string, if available.
getter/setter pair
Methods
-
encode(
) → Object -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
decode(
Object result) → ConsentInfo