Widgetbook class

Describes the configuration for your Widget library.

Widgetbook is the central element in organizing your widgets into folders and use cases.

Widgetbook defines the following constructors for different app types

Inheritance

Constructors

Widgetbook({Key? key, String initialRoute = '/', required List<WidgetbookNode> directories, AppBuilder appBuilder = widgetsAppBuilder, List<WidgetbookAddon>? addons, List<WidgetbookIntegration>? integrations, ThemeData? lightTheme, ThemeData? darkTheme, ThemeMode? themeMode})
const
Widgetbook.cupertino({Key? key, String initialRoute = '/', required List<WidgetbookNode> directories, AppBuilder appBuilder = cupertinoAppBuilder, List<WidgetbookAddon>? addons, List<WidgetbookIntegration>? integrations, ThemeData? lightTheme, ThemeData? darkTheme, ThemeMode? themeMode})
A Widgetbook with CupertinoApp as an appBuilder.
const
Widgetbook.material({Key? key, String initialRoute = '/', required List<WidgetbookNode> directories, AppBuilder appBuilder = materialAppBuilder, List<WidgetbookAddon>? addons, List<WidgetbookIntegration>? integrations, ThemeData? lightTheme, ThemeData? darkTheme, ThemeMode? themeMode})
A Widgetbook with MaterialApp as an appBuilder.
const

Properties

addons List<WidgetbookAddon>?
The list of add-ons for your Widget library
final
appBuilder AppBuilder
A wrapper builder method for all WidgetbookUseCases.
final
darkTheme ThemeData?
The custom theme for the Widgetbook interface when using dark mode.
final
directories List<WidgetbookNode>
The directory structure of your Widget library.
final
hashCode int
The hash code for this object.
no setterinherited
initialRoute String
The initial route for that will be used on first startup.
final
integrations List<WidgetbookIntegration>?
The list of integrations for your Widget library. Primarily used to integrate with Widgetbook Cloud via WidgetbookCloudIntegration, but can also be used to integrate with third-party packages.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lightTheme ThemeData?
The custom theme for the Widgetbook interface when using light mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
themeMode ThemeMode?
The theme mode to be applied to the Widgetbook application.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<Widgetbook>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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