Flutter User Profiles

Understand how to update user profiles in Flutter SDK.

User Profiles

Update User Profile(Push Profile)

var stuff = ["bags", "shoes"];
var profile = {
    'Name': 'John Wick',
    'Identity': '100',
    'DOB': '22-04-2000',
    //Key always has to be "DOB" and format should always be dd-MM-yyyy
    'Email': '[email protected]',
    'Phone': '14155551234',
    'props': 'property1',
    'stuff': stuff
};
CleverTapPlugin.profileSet(profile);

Set Multi Values For Key

var values = ["value1", "value2"];
CleverTapPlugin.profileSetMultiValues("props", values);

Remove Multi Value For Key

var values = ["value1", "value2"];
CleverTapPlugin.profileRemoveMultiValues("props", values);

Add Multi Value For Key

var values = ["value1", "value2"];
CleverTapPlugin.profileAddMultiValues("props", values);

Increment Value For Key

CleverTapPlugin.profileIncrementValue("score", value);

Decrement Value For Key

CleverTapPlugin.profileDecrementValue("score", value);

Create a User profile when user logs in (On User Login)

var stuff = ["bags", "shoes"];
var profile = {
    'Name': 'Captain America',
    'Identity': '100',
    'Email': '[email protected]',
    'Phone': '+14155551234',
    'stuff': stuff
};
CleverTapPlugin.onUserLogin(profile);

Get CleverTap Reference id

CleverTapPlugin.getCleverTapID().then((clevertapId) {})

Set Location to User Profile

var lat = 19.07;
var long = 72.87;
CleverTapPlugin.setLocation(lat, long);

Did this page help you?