setup static method

Future<void> setup(
  1. String appKey,
  2. bool forceApplyGDPR,
  3. bool forceATT, {
  4. bool fullscreen = false,
  5. String dedicatedEndpointURL = "",
  6. String dedicatedAssetsURL = "",
})

Setup the AppConsent CMP.

Setup the CMP by calling this function, passing it your appKey. The CMP detects if the app is running on a device that is inside a GDPR country, with forceApplyGDPR you can choose to bypass the check, and let the CMP always behave according to GDPR, if ignored, this defaults to false. On iOS, the ATT checks can be enforced with forceATT, this option is ignored on Android. On iOS, it is possible to display the notice in fullscreen using fullscreen, this defaults to false, this option is ignored on Android. On iOS, it is possible to configure a custom dedicated endpoint URL with dedicatedEndpointURL, ignore to keep default endpoint, this option is ignored on Android. On iOS, it is possible to configure a custom dedicated URL for assets with dedicatedAssetsURL, ignore to keep default assets, this option is ignored on Android.

Implementation

static Future<void> setup(String appKey, bool forceApplyGDPR, bool forceATT,
        {bool fullscreen = false,
        String dedicatedEndpointURL = "",
        String dedicatedAssetsURL = ""}) async =>
    await _channel.invokeMethod("setup", {
      "appKey": appKey,
      "forceApplyGDPR": forceApplyGDPR,
      "forceATT": forceATT,
      "fullscreen": fullscreen,
      "dedicatedEndpointURL": dedicatedEndpointURL,
      "dedicatedAssetsURL": dedicatedAssetsURL
    });