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.
The Consent extension has the following peer dependency, which must be installed prior to installing it:
Install instructions for this package can be found here.
Note: After you have installed the SDK, don't forget to run
pod installin youriosdirectory to link the libraries to your Xcode project.
For more detailed information on the Consent APIs, visit the documentation here
import 'package:flutter_aepedgeconsent/flutter_aepedgeconsent.dart';To initialize the SDK, use the following methods:
Refer to the root Readme for more information about the SDK setup.
Returns the SDK version of the Consent extension.
Syntax
static Future<String> get extensionVersionExample
String version = await Consent.extensionVersion;Retrieves the current consent preferences stored in the Consent extension.
Syntax
static Future<Map<String, dynamic>> get consentsExample
Map<String, dynamic> result = {};
try {
result = await Consent.consents;
} on PlatformException {
log("Failed to get consent info");
}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);Run:
flutter testSee CONTRIBUTING
See LICENSE