operator []= method

void operator []=(
  1. PhoneNumberKey key,
  2. String? value
)

Implementation

operator []=(PhoneNumberKey key, String? value) {
  if (value == null) {
    this.InternalRemove(key);
  } else {
    if (this.Entries.containsKey(key)) {
      PhoneNumberEntry entry = this.Entries[key]!;
      entry.PhoneNumber = value;
      this.Changed();
    } else {
      PhoneNumberEntry entry = new PhoneNumberEntry.withKey(key, value);
      this.InternalAdd(entry);
    }
  }
}