findFocusedLeaf method

FocusNode? findFocusedLeaf()

Traverses down the focused path to find the deeply focused leaf node.

Implementation

FocusNode? findFocusedLeaf() {
  if (!isFocused) return null;
  for (final child in children) {
    if (child.isFocused) {
      return child.findFocusedLeaf();
    }
  }
  return this;
}