distinct method

Iterable<T?> distinct()

Returns a new iterable with duplicates removed, preserving nulls.

Implementation

Iterable<T?> distinct() =>
    this == null ? Iterable.empty() : validate().toSet();