isStrictSupersetOf method

bool isStrictSupersetOf(
  1. Set<Object> other
)

Returns true if every element of other is contained in this and at least one element of this is not contained in other.

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

Implementation

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