iabtcf_consent_info 1.1.0
iabtcf_consent_info: ^1.1.0 copied to clipboard

Flutter Android iOS web

Flutter plugin for reading IAB TCF v2.0 user consent information, such as made available through CMP SDKs, like Funding Choices's User Messaging Platform (UMP).

iabtcf_consent_info #

Flutter plugin for reading IAB TCF v2.0 user consent information, such as made available through CMP SDKs, like Funding Choices's User Messaging Platform (UMP).

Consent Management Platforms (CMPs) such as Funding Choices provide SDKs, which publishers embed into their apps. These SDKs make consent information available to other pieces of software in a standardized way. This information can be read and listened to with the help of this plugin.

Available Information #

Currently, only a subset of the information provided by CMP SDKs is available through the plugin, primarily the consent information related to data usage purposes of the publisher. Please open a new issue, if you need to access further information.

Usage #

Read the current consent information:

final info = await IabtcfConsentInfo.instance.currentConsentInfo();
if (info.publisherConsent.contains(DataUsagePurpose.developAndImproveProducts)) {
  // Do something which required consent.
}

Listen to changes of the consent information:

IabtcfConsentInfo.instance.consentInfo()
  // If you only want to react to changes skip the first value, 
  // since the stream always emits the current info when it is listened to.
  .skip(1).listen((info) { 
    // React to changes.  
});
2
likes
100
pub points
24%
popularity

Publisher

gabriel.terwesten.net

Flutter plugin for reading IAB TCF v2.0 user consent information, such as made available through CMP SDKs, like Funding Choices's User Messaging Platform (UMP).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, iabtcf_consent_info_platform_interface, iabtcf_consent_info_web, meta, rxdart

More

Packages that depend on iabtcf_consent_info