setAttribute method

void setAttribute(
  1. String key,
  2. Object? value
)

Set (or replace) a single custom targeting attribute. Pass null to remove.

Implementation

void setAttribute(String key, Object? value) {
  if (value == null) {
    _attributes.remove(key);
  } else {
    _attributes[key] = value;
  }
}