Giter Site home page Giter Site logo

gdpr_dialog_flutter's Introduction

GDPR dialog

showDialog method get admob publisherID and privacy string url of your site. Then get native request to android/ios dialog and set result as boolean.

  • true = show personalized ads
  • false = show non personalized ads

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

Usage

GdprDialog.instance.showDialog('pub-2111344032223404', 'https://plus1s.com/privacy-policy/', isForTest: true, testDeviceId: '')
                      .then((onValue) {
                    print('result === $onValue');
                  });

In the release build, you only need the first two parameters.

The setConsentToUnknown method sets the consent status to UNKNOW

In iOS, if you call showDialog() a second time, it will be shown and the user can change their consent option, for Android I added setConsentToUnknown(), which resets the user’s consent status.

Usage

GdprDialog.instance.setConsentToUnknown();

The setConsentToNonPersonal method sets the consent status to NON_PERSONAL

Usage

GdprDialog.instance.setConsentToNonPersonal();

The setConsentToPersonal method sets the consent status to PERSONAL

Usage

GdprDialog.instance.setConsentToPersonal();

Method getConsentStatus() that return consent status

Usage

GdprDialog.instance.getConsentStatus();

It will return string of consent status:

  • PERSONALIZED
  • NON_PERSONALIZED
  • UNKNOWN

One more method isRequestLocationInEea() that return is user in Eea location

Usage

GdprDialog.instance.isRequestLocationInEea(String publisherId);

It will return bools:

  • true = the user is located in the Eea
  • false = the user is not located in the Eea

gdpr_dialog_flutter's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.