clearAttribute

Removes a custom attribute from the device.

Syntax 

1Future<void> clearAttribute(String key)

Parameters 

  • key (String) - The attribute key to remove

Returns 

  • Future<void> - Completes when the attribute has been cleared.

Example 

1try {
2  await SfmcSdk.clearAttribute('userType');
3  print('Attribute cleared successfully');
4} catch (e) {
5  print('Failed to clear attribute: $e');
6}

Related Methods 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!