leaf property

bool get leaf

Whether this node is a leaf (has no children).

Returns: bool. True when children is empty, false when the node has child nodes. Convenient property for determining if a node can be expanded.

Implementation

bool get leaf => children.isEmpty;