setPrivacyConsent static method
Pass privacy consent flag to unity sdk.
privacyConsentType- provacy consent typevalue- flag
Returns true if the flag is set, otherwise false.
Read more about Privacy Consent: https://docs.unity.com/ads/ImplementingDataPrivacy.html
Implementation
static Future<bool> setPrivacyConsent(
PrivacyConsentType privacyConsentType,
bool value,
) async {
final args = <String, dynamic>{
privacyConsentValueParameter: value,
privacyConsentTypeParameter: privacyConsentType
.toString()
.split('.')
.last,
};
return await _channel.invokeMethod(privacyConsentSetMethod, args);
}