flutter_aepuserprofile 5.0.0
flutter_aepuserprofile: ^5.0.0 copied to clipboard
Official Adobe Experience Platform support for Flutter apps. The UserProfile extension represents the Adobe Experience Platform SDK's Profile extension which helps manage profile attributes in the client.
flutter_aepuserprofile #
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.
Prerequisites #
The Userprofile plugin 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 UserProfile APIs, visit the documentation here
Importing the extension: #
In your Flutter application, import the Userprofile package as follows:
import 'package:flutter_aepuserprofile/flutter_aepuserprofile.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 User Proilfe extension.
Syntax
static Future<String> get extensionVersion
Example
String version = await UserProfile.extensionVersion;
getUserAttributes #
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");
}
removeUserAttributes #
Remove provided user profile attributes if they exist.
Syntax
static Future<void> removeUserAttributes(List<String> attributeName)
Example
UserProfile.removeUserAttributes(["attr1", "attr2"]);
updateUserAttributes #
Set multiple user profile attributes.
Syntax
static Future<void> updateUserAttributes(Map<String, Object> attributeMap)
Example
UserProfile.updateUserAttributes({"attr1": "attr1Value", "attr2": "attr2Value"});
Tests #
Run:
flutter test
Contributing #
See CONTRIBUTING
License #
See LICENSE