flutter_aepuserprofile is a flutter plugin for the iOS and Android Adobe Experience Platform UserProfile SDK to allow for integration with Flutter applications. Functionality to enable the UserProfile extension is provided entirely through Dart documented below.
The Userprofile plugin 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 UserProfile APIs, visit the documentation here
In your Flutter application, import the Userprofile package as follows:
import 'package:flutter_aepuserprofile/flutter_aepuserprofile.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 User Proilfe extension.
Syntax
static Future<String> get extensionVersionExample
String version = await UserProfile.extensionVersion;Get user profile attributes which match the provided keys.
Syntax
static Future<String> getUserAttributes(List<String> attributeKeys)Example
try {
String userAttributes = await UserProfile.getUserAttributes(["attr1", "attr2"]);
} on PlatformException {
log("Failed to get the user attributes");
}Remove provided user profile attributes if they exist.
Syntax
static Future<void> removeUserAttributes(List<String> attributeName)Example
UserProfile.removeUserAttributes(["attr1", "attr2"]);Set multiple user profile attributes.
Syntax
static Future<void> updateUserAttributes(Map<String, Object> attributeMap)Example
UserProfile.updateUserAttributes({"attr1": "attr1Value", "attr2": "attr2Value"});Run:
flutter testSee CONTRIBUTING
See LICENSE