isHeading property

bool get isHeading

Whether this is a heading element.

Implementation

bool get isHeading {
  final tag = tagName.toLowerCase();
  return tag.startsWith('h') && tag.length == 2;
}