setMapValueIfNotNull function

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

Implementation

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