union method

  1. @override
Set<V> union(
  1. 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

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