findChildByKey method

  1. @override
ChildLayout? findChildByKey(
  1. Object key
)
override

Implementation

@override
ChildLayout? findChildByKey(Object key) {
  RenderBox? child = firstChild;
  while (child != null) {
    final childParentData = child.parentData as LayoutBoxParentData;
    if (childParentData.layoutData.key == key) {
      return RenderBoxChildLayout(child, this);
    }
    child = childParentData.nextSibling;
  }
  return null;
}