asMap method

Map<E, int> asMap()

Returns an unmodifiable view of the underlying data in a Map with the elements as the key and their counts as the value.

Implementation

Map<E, int> asMap() => Map.unmodifiable(_container);