getOrDefault method
V?
getOrDefault(
- K key,
- V? defaultValue
Returns the value associated with the given key,
or defaultValue if the key does not exist.
Implementation
V? getOrDefault(K key, V? defaultValue) =>
containsKey(key) ? this[key]! : defaultValue;