union method

Set<V> union (Set<V> other)
override

Returns a new set which contains all the elements of this and other.

That is, the returned set contains all the elements of this Set and all the elements of other.

Note that the returned set will use the default equality operation, which may be different than the equality operation this uses.

Implementation

Set<V> union(Set<V> other) => toSet()..addAll(other);