add method Null safety

void add(
  1. K key,
  2. V value,
  3. {bool notifyChanges = true}
)

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

Implementation

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

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