containsAny static method

bool containsAny(
  1. Iterable iterable1,
  2. Iterable iterable2
)

Returns true if at least one element is in both collections.

Implementation

static bool containsAny(final Iterable iterable1, final Iterable iterable2) {
  if (iterable1.length < iterable2.length) {
    return iterable1.any((element) => iterable2.contains(element));
  } else {
    return iterable2.any((element) => iterable1.contains(element));
  }
}