getChildByKey method

RenderBox? getChildByKey(
  1. Key? key
)

Implementation

RenderBox? getChildByKey(Key? key) {
  if (key == null) return null;
  RenderBox? child = firstChild;
  while (child != null) {
    final childParentData = child.parentData as _ParentData;
    if (childParentData.key == key) {
      return child;
    }
    child = childAfter(child);
  }
  return null;
}