operator [] method Null safety
- 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) {
if (_root == null) {
return null;
}
// 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?;
}