ExhaustiveMap<K, V>.of constructor

ExhaustiveMap<K, V>.of(
  1. Iterable<K> keys,
  2. Map<K, V> src
)

Implementation

ExhaustiveMap.of(Iterable<K> keys, Map<K, V> src)
    :
      // 这么操作,主要是验证[src]真的包含所有的[keys]
      this._(Map.fromEntries(keys.map((k) => MapEntry(k, src[k] as V))));