KtSet<T>.from constructor

KtSet<T>.from([
  1. Iterable<T> elements = const []
])

Returns a new read-only set based on elements.

Implementation

factory KtSet.from([Iterable<T> elements = const []]) {
  if (elements.isEmpty) return EmptySet<T>();
  return DartSet(elements);
}