addAllRecursive method

void addAllRecursive(
  1. Map<K, dynamic> other
)

Implementation

void addAllRecursive(Map<K, dynamic> other) {
  for (final entry in other.entries) {
    final oldValue = this[entry.key];
    final newValue = entry.value;

    if (oldValue is Map<K, dynamic> && newValue is Map<K, dynamic>) {
      oldValue.addAllRecursive(newValue);

      continue;
    }

    this[entry.key] = newValue;
  }
}