leaf property

Returns the last descendant of this node, which can be itself if child is null.

Implementation

DeepNavigationNode<T> get leaf => child?.leaf ?? this;