VendorDictionary<V>.fromMap constructor

VendorDictionary<V>.fromMap(
  1. Map<String, V> map
)

Emulate VendorDictionary behaviours from Map by simply creating VendorDictionary.instant and yield all Map.entries contents.

Implementation

factory VendorDictionary.fromMap(Map<String, V> map) =>
    VendorDictionary.instant(() async* {
      for (var DictionaryEntry(key: k, value: v) in map.entries) {
        yield (k, v);
      }
    });