WidgetbookUseCase class

UseCases represent a specific configuration of a widget and can be used to check edge cases of a Widget.

Inheritance
Implementers

Constructors

WidgetbookUseCase({required String name, required WidgetBuilder builder, String? designLink, String? fileType})
WidgetbookUseCase.center({required String name, required Widget child, String? fileType})
factory
WidgetbookUseCase.child({required String name, required Widget child, String? designLink, String? fileType})
factory

Properties

builder WidgetBuilder
final
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
final
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
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

Methods

build(BuildContext context) Widget
copyWith({String? name, List<WidgetbookNode>? children, String? fileType}) WidgetbookUseCase
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