findElementByUniqueKey method

dynamic findElementByUniqueKey(
  1. Element rootElement,
  2. String eid
)

Implementation

findElementByUniqueKey(Element rootElement, String eid) {
  if (anchorElement != null) {
    return;
  }
  if (eid == (getKeyString(rootElement.widget.key)) && rootElement.widget is SmartechView) {
    anchorElement = rootElement;
    return;
  }
  List<Element> rootElementChildren = rootElement.children;
  for (int i = 0; i < rootElementChildren.length; i++) {
    findElementByUniqueKey(rootElementChildren[i], eid);
  }
}