setIfAbsent<V> method
Sets key
to value
if not stored yet.
Implementation
bool setIfAbsent<V>(String key, V? value) {
if (!_properties.containsKey(key)) {
_properties[key] = value;
_notifyChange(StateOperation.set, key, value);
return true;
} else {
return false;
}
}