ConsentFlow class
Use this object for configure Consent flow forms for GDPR.
Constructors
- ConsentFlow.create({String? privacyPolicyUrl, PrivacyGeography debugGeography = PrivacyGeography.unknown, OnConsentFlowDismissedCallback? onDismissed})
- Create Consent Flow form to show.
Properties
- autoShowWithSDKInitializationEnabled ↔ bool
-
Internal property to support deprecated logic.
getter/setter pair
- debugGeography ↔ PrivacyGeography
-
Sets the debug geography for testing purposes.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDismissed ↔ OnConsentFlowDismissedCallback?
-
The callback is called after the form is dismissed.
If consent is not required, the callback is called immediately.
The Integer Status with which the form is dismissed will be passed to the callback.
getter/setter pair
- privacyPolicyUrl ↔ String?
-
(Optional) Override a link to the App's Privacy Policy in the consent form.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disableFlow(
) → ConsentFlow - Disable auto display consent flow if required on Ads initialization.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setOnDismissCallback(
OnConsentFlowDismissedCallback callback) → ConsentFlow - The callback is called after the form is dismissed. If consent is not required, the callback is called immediately. The Integer Status with which the form is dismissed will be passed to the callback.
-
show(
) → Future< int> - Force shows the form to modify user consent at any time.
-
showIfRequired(
) → Future< int> - Shows the consent form only if it is required and the user has not responded previously. If the consent status is required, the SDK loads a form and immediately presents it.
-
toString(
) → String -
A string representation of this object.
inherited
-
withDismissListener(
OnDismissListener listener) → ConsentFlow -
withPrivacyPolicy(
String? policyUrl) → ConsentFlow - Override a link to the App's Privacy Policy in the consent form.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- statusContextInvalid → const int
- There was an error with the UI context is passed in.
- statusFlowStillShowing → const int
- There was an error with another form is still being displayed.
- statusInternalError → const int
- There was an internal error.
- statusNetworkError → const int
- There was an error loading data from the network.
- statusNotRequired → const int
- User consent not required.
- statusObtained → const int
- User consent obtained. Personalized vs non-personalized undefined.
- User consent unavailable.
- statusUnknown → const int
- There was no attempt to show the consent flow.