toMapOfValueKeys<V> method

Map<T, V> toMapOfValueKeys<V>({
  1. required V defaultValue,
})

Implementation

Map<T, V> toMapOfValueKeys<V>({required V defaultValue}) {
  return Map.fromEntries(
    [
      for (final value in this) MapEntry(value, defaultValue),
    ],
  );
}