Component<TWidget extends Widget, TArgs extends StoryArgs<TWidget>> class

Inheritance

Constructors

Component({required Meta<TWidget> meta, required List<Story<TWidget, TArgs>> stories})

Properties

children List<WidgetbookNode>?
finalinherited
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
fileType String?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isInitiallyExpanded bool
finalinherited
isLeaf bool
no setterinherited
isRoot bool
no setterinherited
leaves List<WidgetbookNode>
Gets all leaf nodes of this node.
no setterinherited
meta Meta<TWidget>
final
name String
finalinherited
nodesPath List<WidgetbookNode>
Gets the nodes path from root to this node.
no setterinherited
parent WidgetbookNode?
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
stories List<Story<TWidget, TArgs>>
final
useCases List<WidgetbookUseCase>
finalinherited

Methods

copyWith({String? name, List<WidgetbookNode>? children, String? fileType}) WidgetbookComponent
Creates a copy of this node with the given properties. Used in filter to create a copy of the sub-tree.
inherited
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
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