containsAnyClass method

bool containsAnyClass(
  1. Iterable<String>? classes
)

Returns true if attribute class has any of classes.

Implementation

bool containsAnyClass(Iterable<String>? classes) {
  var attribute = getAttribute('class');
  if (attribute == null) return false;

  if (classes == null || classes.isEmpty) return false;

  for (var c in classes) {
    if (attribute.containsValue(c)) {
      return true;
    }
  }

  return false;
}