getAttribute method

dynamic getAttribute(
  1. String key
)

Get an attribute value, checking parent context if not found

Implementation

dynamic getAttribute(String key) {
  if (key == 'targetingKey' && targetingKey != null) return targetingKey;
  if (_providerSnapshot != null && attributes.containsKey(key)) {
    return attributes[key];
  }
  return attributes[key] ?? parent?.getAttribute(key);
}