addIfNotNull method
Add item into map if value isn't null Add item into map if key not exist
Implementation
Map<K, V>? addIfNotNull(K key, V value) {
if (value != null) this?.putIfAbsent(key, () => value);
return this;
}
Add item into map if value isn't null Add item into map if key not exist
Map<K, V>? addIfNotNull(K key, V value) {
if (value != null) this?.putIfAbsent(key, () => value);
return this;
}