union method

  1. @useResult
List<T> union(
  1. Iterable<T> other
)

Distinct union of this and other (all elements, no duplicates).

Returns a new list containing each distinct element from both iterables.

Implementation

@useResult
List<T> union(Iterable<T> other) => <T>{...this, ...other}.toList();