Story<TWidget extends Widget, TArgs extends StoryArgs<TWidget>> class abstract

Inheritance
Annotations

Constructors

Story({required String name, String? designLink, SetupBuilder<TArgs> setup = defaultSetup, required TArgs args, required ArgsBuilder<TWidget, TArgs> argsBuilder})

Properties

args → TArgs
final
argsBuilder ArgsBuilder<TWidget, TArgs>
final
builder WidgetBuilder
finalinherited
children List<WidgetbookNode>?
finalinherited
count int
no setterinherited
depth int
Gets the depth of the node within the tree.
no setterinherited
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
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
setup SetupBuilder<TArgs>
final

Methods

build(BuildContext context) Widget
override
buildWithArgs(BuildContext context, TArgs args) Widget
Same as build, but uses external args instead of Story.args.
copyWith({String? name, List<WidgetbookNode>? children}) Story<TWidget, TArgs>
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
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

Static Methods

defaultSetup(BuildContext context, Widget story, dynamic args) Widget