putIfValueNotNull method Null safety

void putIfValueNotNull(
  1. String key,
  2. dynamic value,
  3. Map<String, dynamic> map
)

Implementation

void putIfValueNotNull(String key, dynamic value, Map<String, dynamic> map) {
  if (value != null) {
    map[key] = value;
  }
}