putUrl method

BatchEventData putUrl(
  1. String key,
  2. Uri value
)

Add a URL attribute for the given key.

The attribute key should be a string composed of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

While the value is an Uri instance, it must be a valid URL and not be longer than 2048 characters.

Implementation

BatchEventData putUrl(String key, Uri value) {
  if (_validateAttributeKey(key)) {
    _attributes[key.toLowerCase()] =
        TypedAttribute(type: TypedAttributeType.url, value: value.toString());
  }
  return this;
}