flutter_aepedgeconsent 5.0.0
flutter_aepedgeconsent: ^5.0.0 copied to clipboard
Official Adobe Experience Platform support for Flutter apps. The AEP Consent Collection plugin enables consent preferences collection from your Flutter app when using the Adobe Experience Platform Mob [...]
flutter_aepedgeconsent #
flutter_aepedgeconsent
is a flutter plugin for the iOS and Android Adobe Experience Platform Edge Consent SDK to allow for integration with Flutter applications. Functionality to enable the Consent for Edge Network extension is provided entirely through Dart documented below.
Prerequisites #
The Consent extension has the following peer dependency, which must be installed prior to installing it:
Installation #
Install instructions for this package can be found here.
Note: After you have installed the SDK, don't forget to run
pod install
in yourios
directory to link the libraries to your Xcode project.
Usage #
For more detailed information on the Consent APIs, visit the documentation here
Importing the SDK: #
import 'package:flutter_aepedgeconsent/flutter_aepedgeconsent.dart';
Initializing with SDK: #
To initialize the SDK, use the following methods:
Refer to the root Readme for more information about the SDK setup.
API reference #
extensionVersion #
Returns the SDK version of the Consent extension.
Syntax
static Future<String> get extensionVersion
Example
String version = await Consent.extensionVersion;
getConsents #
Retrieves the current consent preferences stored in the Consent extension.
Syntax
static Future<Map<String, dynamic>> get consents
Example
Map<String, dynamic> result = {};
try {
result = await Consent.consents;
} on PlatformException {
log("Failed to get consent info");
}
updateConsents #
Merges the existing consents with the given consents. Duplicate keys will take the value of those passed in the API.
Syntax
static Future<void> update(Map<String, dynamic> consents)
Example
Map<String, dynamic> collectConsents = allowed
? {
"collect": {"val": "y"}
}
: {
"collect": {"val": "n"}
};
Map<String, dynamic> currentConsents = {"consents": collectConsents};
Consent.update(currentConsents);
Tests #
Run:
flutter test
Contributing #
See CONTRIBUTING
License #
See LICENSE