isSupersetOf method

bool isSupersetOf(
  1. Set<Object> other
)

Returns true if every element of other is contained in this.

var set = {'a', 'b', 'c'};
set.isSupersetOf({'a', 'b'}); // true
set.isSupersetOf({'a', 'b', 'c'}); // true
set.isSupersetOf({'a', 'b', 'f'}); // false

Implementation

bool isSupersetOf(Set<Object> other) =>
    this.length >= other.length && this.containsAll(other);