Function

traverseChildren

Executes block for all direct children of the node with a matching key.

traverseChildren

Source set: Common
public fun DelegatableNode.traverseChildren(key: Any?, block: (TraversableNode) -> Boolean)

Executes block for all direct children of the node with a matching key.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter block's return boolean value will determine if the traversal will continue (true = continue, false = cancel).

traverseChildren

Source set: Common
public fun <T> T.traverseChildren(block: (T) -> Boolean) where T : TraversableNode

Executes block for all direct children of the node that are of the same class.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter block's return boolean value will determine if the traversal will continue (true = continue, false = cancel).

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: