WidgetbookRoot class

The root of all WidgetbookNodes.

Inheritance

Constructors

WidgetbookRoot({required List<WidgetbookNode>? children})
Creates a WidgetbookRoot node.

Properties

children → List<WidgetbookNode>?
The children of the node.
finalinherited
componentsCount ↔ int
Count of all WidgetbookComponents in the root node.
latefinal
count → int
Gets the number of nodes in the sub-tree of this node.
no setterinherited
depth → int
Gets the depth of the node within the tree.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isInitiallyExpanded → bool
Whether the node is expanded by default.
finalinherited
isLeaf → bool
Whether this node is a leaf node. A leaf node has no children.
no setterinherited
isRoot → bool
Whether this node is the root node. The root node does not have a parent.
no setterinherited
leaves → List<WidgetbookNode>
Gets all leaf nodes of this node.
no setterinherited
name → String
The name of the node.
finalinherited
nodesPath → List<WidgetbookNode>
Gets the nodes path from root to this node.
no setterinherited
parent ↔ WidgetbookNode?
The parent of the node. This is set after the node is added to a parent node.
getter/setter pairinherited
path → String
Gets the path from root to this node without leading slash Example: root/child/grandchild
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useCasesCount ↔ int
Count of all WidgetbookUseCases in the root node.
latefinal

Methods

copyWith({String? name, List<WidgetbookNode>? children}) → WidgetbookRoot
Creates a copy of this node with the given properties. Used in filter to create a copy of the sub-tree.
override
filter(bool predicate(WidgetbookNode node)) → WidgetbookNode?
Filters the sub-tree of this node for any node that matches predicate. If a node matches the predicate, it will be included, along with all its descendants, in the result.
inherited
find(bool predicate(WidgetbookNode node)) → WidgetbookNode?
Searches for a node that matches predicate in the sub-tree of this node.
inherited
findAll(bool predicate(WidgetbookNode node)) → Iterable<WidgetbookNode>
Returns an Iterable of all nodes that match the predicate.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited