operator []= method
Replaces the value
of a key
that already exists in the map.
However, if the key is not already present, this will throw an error.
Implementation
@override
void operator []=(K key, V value) {
if (containsKey(key)) {
_map[key] = value;
} else
throw UnsupportedError("Can't add a new key to the map.");
}