isStrictSubsetOf method

bool isStrictSubsetOf(
  1. Set<Object> other
)

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

Example:

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

Implementation

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