arrayContainsArray function

bool arrayContainsArray(
  1. List superset,
  2. List subset, {
  3. bool some = false,
})

Returns TRUE if the first specified array contains all elements from the second one. FALSE otherwise.

Implementation

bool arrayContainsArray(List superset, List subset, {bool some: false}) {
  if (some) {
    return Set.from(superset).intersection(Set.from(subset)).length > 0;
  } else {
    return Set.from(superset).containsAll(subset);
  }
}