toValueSet method

Set<V> toValueSet({
  1. int compare(
    1. V a,
    2. V b
    )?,
})

Returns a Set of the map values. The set will be sorted if the map's sortValues configuration is true, or if you explicitly provide a compare method.

Implementation

Set<V> toValueSet({int Function(V a, V b)? compare}) {
  return toValueList(compare: compare).toSet();
}