isSubsetOf method
Returns true
if every element of this
is contained in other
.
Example:
var set = {'a', 'b', 'c'};
set.isSubsetOf({'a', 'b', 'c', 'd'}); // true
set.isSubsetOf({'a', 'b', 'c'}); // true
set.isSubsetOf({'a', 'b', 'f'}); // false
Implementation
bool isSubsetOf(Set<Object> other) =>
this.length <= other.length && other.containsAll(this);