Search packages, repositories and app categories

Package detailsv2.1.1

gdpr_dialog

Library for use GDPR dialog from user for personalized ads and non personalized ads.

AndroidiOS
30-day downloads
80
Likes
47
Pub points
150

Install package

flutter pub add gdpr_dialog

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The gdpr_dialog package provides a simple and customizable dialog to comply with GDPR regulations, allowing users to choose between personalized and non-personalized ads. It integrates seamlessly into Flutter apps on Android and iOS, offering a straightforward way to obtain user consent for data usage in ad serving. The library handles the display of consent dialogs and supports both initial consent requests and future updates. It is designed to help developers meet legal requirements for privacy while maintaining a smooth user experience.

Use cases

  • Complying with GDPR regulations
  • Obtaining user consent for personalized ads
  • Displaying consent dialogs in mobile apps
  • Managing ad personalization preferences
  • Supporting privacy-focused app design

Key features

  • GDPR-compliant consent dialog
  • Support for personalized and non-personalized ad options
  • Easy integration with Flutter apps
  • Cross-platform support (Android and iOS)
  • Customizable UI elements

Suitable for

  • Mobile app developers targeting EU users
  • Apps using ad networks requiring consent
  • Developers needing quick GDPR compliance
  • Startups building privacy-conscious applications
  • Flutter projects with ad monetization

Considerations

  • Requires proper handling of consent state
  • May need additional logic for ad network integration
  • Not suitable for non-ad use cases
  • User experience depends on customization
  • Must be updated with changing privacy laws

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

GDPR dialog

"showDialog()" calling: gets native request to android/ios Consent Form dialog and sets result as boolean:

  • true = requested Consent Form loaded (but may not be shown);
  • false = error with Consent Form loading.

Bool variable "isForTest" for testing library, set true to activate setDebugGeography. (works only for Android) In release build set false or delete this argument!

"testDeviceId" you can find in logs.

If user already chose one of Consent Form variants and call it a second time:

  • in iOS form will be shown and the user can change their consent option;
  • in Android form will not be shown. To reset the choice user need to reinstall the app.
Usage
GdprDialog.instance.showDialog(isForTest: true, testDeviceId: 'xxxxxxxxxxxxxxx')
                      .then((onValue) {
                    print('result === $onValue');
                  });

In the release build, you only does not need a parameters.

Method getConsentStatus() that return consent status
Usage
GdprDialog.instance.getConsentStatus();

It will return string of consent status:

  • OBTAINED
  • REQUIRED
  • NOT_REQUIRED
  • UNKNOWN
Statuses explaining

API, which depends on Android v2 Embedding, can not show you the real status of personalized ad.

  • OBTAINED status means, that user already chose one of the variants ('Consent' or 'Do not consent');
  • REQUIRED status means, that form should be shown by user, because his location is at EEA or UK;
  • NOT_REQUIRED status means, that form would not be shown by user, because his location is not at EEA or UK;
  • UNKNOWN status means, that there is no information about user location.

Categories

Source repository

Projects using this package

No data available yet.