asMap method

Map<K, V> asMap()

Returns as an immutable map.

Useful when producing or using APIs that need the Map interface. This differs from toMap where mutations are explicitly disallowed.

Implementation

Map<K, V> asMap() => Map<K, V>.unmodifiable(_map);