toMap<K, V> method

Map<K, V> toMap<K, V>(
  1. K key(
    1. T
    ),
  2. V value(
    1. T
    )
)

Converts this list to a Map<K, V> using key and value selectors.

Implementation

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