hasAttr method

bool hasAttr(
  1. String name
)

Checks if the element has the specified attribute.

Returns false if not hydrated or running on server.

Implementation

bool hasAttr(String name) {
  return _element?.hasAttribute(name) ?? false;
}