associateWith<V> method

Map<T, V> associateWith<V>(
  1. V value(
    1. T
    )
)

Returns a map of each element to the result of value.

Implementation

Map<T, V> associateWith<V>(V Function(T) value) =>
    {for (final e in this) e: value(e)};