onChild property

void Function(BuildMetadata childMeta) onChild
final

The callback that will be called whenver a child element is found.

Please note that all children and grandchildren etc. will trigger this method, it's easy to check whether an element is direct child:

BuildOp(
  onChild: (childMeta) {
    if (!childElement.element.parent != parentMeta.element) return;
    childMeta.doSomethingHere;
  },
);

Implementation

final void Function(BuildMetadata childMeta) onChild