Multimap<K, V>.fromIterable constructor

Multimap<K, V>.fromIterable(
  1. Iterable iterable, {
  2. K key(
    1. dynamic
    )?,
  3. V value(
    1. dynamic
    )?,
})

Constructs a new list-backed multimap.

For each element e of iterable, adds an association from key(e) to value(e). key and value each default to the identity function.

Implementation

factory Multimap.fromIterable(Iterable iterable,
    {K Function(dynamic)? key,
    V Function(dynamic)? value}) = ListMultimap<K, V>.fromIterable;