# getAttributes

Retrieves all custom attributes associated with the device.

## Syntax

```dart
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

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

## Related Methods

- [setAttribute()](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/flutter_setAttribute.md)
- [clearAttribute()](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/flutter_clearAttribute.md)
