setCustomStringAttribute method

void setCustomStringAttribute(
  1. String value,
  2. String key
)

Implementation

void setCustomStringAttribute(String value, String key) {
  if (value.isEmpty || value.length > 50) {
    throw AdaptyError(
      "The value must not be empty and not more than 50 characters.",
      AdaptyErrorCode.wrongParam,
      "AdaptyError.wrongParam(The value must not be empty and not more than 50 characters.)",
    );
  }
  if (!_validateCustomAttributeKey(key, true)) {
    return;
  }
  customAttributes[key] = value;
}