getAttributes

Retrieves all custom attributes associated with the device.

Syntax

Future<Map<Object?, Object?>?> getAttributes()

Returns

  • Future<Map<Object?, Object?>?> - Returns a map of all custom attributes, or null if no attributes are set.

Example

Map<Object?, Object?>? attributes = await SfmcSdk.getAttributes();
if (attributes != null) {
  attributes.forEach((key, value) {
    print('$key: $value');
  });
} else {
  print('No attributes found');
}

Related Methods