isAny method

  1. @useResult
bool isAny(
  1. List<String> list
)

Returns true if this string equals any item in list.

Implementation

@useResult
bool isAny(List<String> list) {
  if (isEmpty || list.isEmpty) {
    return false;
  }

  return list.any((String e) => e == this);
}