BuiltMap<K, V>.of constructor

BuiltMap<K, V>.of(
  1. Map<K, V> map
)

Instantiates with elements from a Map<K, V>.

K and V are inferred from map, and must not be dynamic.

Rejects nulls. Rejects keys and values of the wrong type.

Implementation

factory BuiltMap.of(Map<K, V> map) {
  return _BuiltMap<K, V>.copyAndCheckForNull(map.keys, (k) => map[k]);
}