clearAttribute

Removes a custom attribute from the device.

Syntax

Future<void> clearAttribute(String key)

Parameters

  • key (String) - The attribute key to remove

Returns

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

Example

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

Related Methods