toMap method

Map<K, V> toMap()

Creates an unmodifiable Map from the current IMap instance.

Implementation

Map<K, V> toMap() => size == 0
    ? Map.unmodifiable(<K, V>{})
    : MapHelper.toMap<K, V>(first(), length: size, creator: _iterableCreator);