leaves property

List<WidgetbookNode> get leaves

Gets all leaf nodes of this node.

Implementation

List<WidgetbookNode> get leaves {
  if (isLeaf) {
    return [this];
  } else {
    return children!.expand((child) => child.leaves).toList();
  }
}