mergeValidExtraProperties static method

void mergeValidExtraProperties(
  1. Map<String, String> targetMap,
  2. Map<String, String> extraProperties
)

Implementation

static void mergeValidExtraProperties(
  Map<String, String> targetMap,
  Map<String, String> extraProperties,
) {
  if (extraProperties.isEmpty) {
    return;
  }

  for (var property in extraProperties.entries) {
    var key = property.key;
    var value = property.value;

    if (TextUtils.isEmptyOrNull(key) ||
        (TextUtils.isEmptyOrNull(value))) {
      continue;
    }

    targetMap[key] = value;
  }
}