addAttribute method

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

Adds a custom attribute to the element.

Implementation

void addAttribute(String key, String value) {
  _attributes[key] = value;
}