listContainsAll function

bool listContainsAll(
  1. Iterable? list,
  2. Iterable? entries
)

Returns true if list contains all elements of type entry.

Implementation

bool listContainsAll(Iterable? list, Iterable? entries) {
  if (entries == null || entries.isEmpty) return false;
  if (list == null || list.isEmpty) return false;
  for (var entry in entries) {
    if (!list.contains(entry)) return false;
  }
  return true;
}