Widgetbook<CustomTheme> class
Describes the configuration for your Widget library.
Widgetbook is the central element in organizing your widgets into Folders and UseCases. In addition, Widgetbook allows you to specify
- the Themes used by your application,
- the Devices on which you'd like to preview the catalogued widgets
- the Locales used by your application
Widgetbook defines the following constructors for different themes
- Widgetbook<
CustomTheme
> if you use aCustomTheme
for your app - Widgetbook.cupertino if you use CupertinoThemeData for your app
- Widgetbook.material if you use ThemeData for your app
Note: if you use for instance both CupertinoThemeData and ThemeData in
your app, use the Widgetbook<CustomTheme
> constructor with CustomTheme
set to dynamic
or Object and see ThemeBuilderFunction
for how to
render custom themes.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Widgetbook
Constructors
-
Widgetbook({Key? key, required List<
WidgetbookCategory> categories, required AppInfo appInfo, AppBuilderFunction appBuilder = defaultAppBuilder, required List<WidgetbookAddOn> addons}) -
const
Properties
-
addons
→ List<
WidgetbookAddOn> -
final
- appBuilder → AppBuilderFunction
-
final
- appInfo → AppInfo
-
Information about the app that is catalogued in the Widgetbook.
final
-
categories
→ List<
WidgetbookCategory> -
Categories which host Folders and WidgetElements.
This can be used to organize the structure of the Widgetbook on a large
scale.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Widgetbook< CustomTheme> > -
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}) → 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
Static Methods
-
cupertino(
{required List< WidgetbookCategory> categories, required List<WidgetbookTheme< themes, required AppInfo appInfo, required List<CupertinoThemeData> >WidgetbookAddOn> addons, List<Device> ? devices, List<WidgetbookFrame> ? frames, List<Locale> ? supportedLocales, List<LocalizationsDelegate> ? localizationsDelegates, AppBuilderFunction? appBuilder, List<double> ? textScaleFactors, Key? key}) → Widgetbook<CupertinoThemeData> - A Widgetbook which uses cupertino theming via CupertinoThemeData.
-
material(
{required List< WidgetbookCategory> categories, required AppInfo appInfo, required List<WidgetbookAddOn> addons, AppBuilderFunction? appBuilder, Key? key}) → Widgetbook<ThemeData> - A Widgetbook which uses material theming via ThemeData.