operator [] method

V? operator [](
  1. K key
)

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

Implementation

@pragma('dart2js:as:trust')
V? operator[](K key) {
  // Unfortunately can not use unsafeCast<V?>(...) here because it leads
  // to worse code generation on VM.
  return _root?.get(0, key, key.hashCode) as V?;
}