isAny method

bool isAny(
  1. List<String> list
)

Returns true if this string equals any item in list.

Implementation

bool isAny(List<String> list) {
  if (isEmpty || list.isEmpty) return false;
  return list.any((String e) => e == this);
}