dynamic operator [](Object key)

Returns the value for the given key or null if key is not in the map.

Some maps allows keys to have null as a value, For those maps, a lookup using this operator does cannot be used to distinguish between a key not being in the map, and the key having a null value. Methods like containsKey or putIfAbsent can be use if the distinction is important.

Source

operator [](Object key) {
  _ensureIsntReservedKey('$key');
  return _values[key];
}