unsafeView<K, V> static method

ListMap<K, V> unsafeView<K, V>(
  1. Map<K, V> map
)

Creates a ListMap form the given map. If the map is already of type ListMap, return the same instance. This is unsafe because a ListMapView is fixed size, but the given map may not.

Implementation

static ListMap<K, V> unsafeView<K, V>(Map<K, V> map) =>
    (map is ListMap<K, V>) ? map : ListMapView<K, V>(map);