forEachChild method
Calls fn on the value of every immediate child that has one.
Implementation
void forEachChild(void Function(ChildKey key, T value) fn) {
for (final MapEntry<ChildKey, ImmutableTree<T>> entry in children.entries) {
final T? value = entry.value.value;
if (value != null) {
fn(entry.key, value);
}
}
}