addEntry method Null safety

void addEntry(
  1. MapEntry<K, V> entry,
  2. {bool notifyChanges = true}
)

Adds the key/value pair to this map.

If the key of entry is already in this map, the corresponding value is overwritten.

Implementation

void addEntry(MapEntry<K, V> entry, {bool notifyChanges = true}) {
  _value.addEntries([entry]);

  if (notifyChanges) {
    _viewModel.notifyChanges([
      EmpireStateChanged.addedToMap(entry.key, entry.value,
          propertyName: propertyName)
    ]);
  }
}