putIfAbsent method
V
putIfAbsent(
- K key,
- V create()
Implementation
V putIfAbsent(K key, V Function() create) {
final V? value = this[key];
if (null == value) {
final V newValue = create();
this[key] = newValue;
return newValue;
} else {
return value;
}
}