widgetbook library

A Flutter storybook that helps professionals and teams to catalogue their widgets.

Classes

AccessibilityAddon
An Addon for inspecting a. It's based on the accessibility_tools package.
Addon<T>
Addons are like global Args, they change the state for all Storys. For example, you can manipulate the theme for all Storys, instead of doing it one-by-one using Args.
AlignmentAddon
An Addon for wrapping use-cases with Align widget.
AlignmentMode
Arg<T>
BoolArg
BooleanField
Field that builds Switch for bool values.
BuilderAddon
An Addon for wrapping use-cases with a builder.
BuilderArg<T>
ColorArg
ColorField
Field that builds ColorPicker for Color values using the ColorSpace to determine which format the Color is.
Component<TWidget extends Widget, TArgs extends StoryArgs<TWidget>>
ConstArg<T>
CupertinoThemeAddon
An Addon for changing the active CupertinoThemeData via CupertinoTheme.
CupertinoThemeMode
DateTimeField
DeviceFrame
Simulate a physical device and embedding a virtual screen into it.
DeviceFrameAddon
An Addon for changing the active device/frame. It's based on the device_frame package.
DeviceFrameConfig
DeviceFrameMode
DeviceFrameStyle
The device frame style only allows to update the keyboardStyle for now.
DeviceFrameTheme
The theme gives a style to all its descentant device frames.
DeviceIdentifier
A unique identifier that represents a device.
DeviceInfo
Info about a device and its frame.
DeviceKeyboardStyle
The keyboard style allows to customize the virtual onscreen keyboard visuals.
Devices
A list of common device specifications sorted by target platform.
DoubleArg
DoubleInputField
Field that builds TextFormField for double values.
DoubleSliderField
Field that builds Slider for double values.
DurationArg
DurationField
EnumArg<T extends Enum>
Field<T>
Fields are data representation of inputs that are used in the settings panel. They should be convertible to:
FieldCodec<T>
FieldsComposable<T>
Interface for defining APIs for features that use fields as a building block.
GenericDesktopMonitorFramePainter
GenericLaptopFramePainter
GenericPhoneFramePainter
GenericTabletFramePainter
GridAddon
GridPainter
InspectorAddon
IntArg
IntInputField
Field that builds TextFormField for int values.
IntSliderField
Field that builds Slider for int values.
ListField<T>
Field that builds DropdownMenu<T> for List<T> values.
LocaleAddon
An Addon for changing the active Locale via Localizations.
LocaleMode
MaterialThemeAddon
An Addon for changing the active ThemeData via Theme.
MaterialThemeMode
Meta<T>
MetaWithArgs<TWidget, TArgs>
Same as Meta but for custom StoryArgs.
Mode<T>
ModeAddon<T>
NoneDevice
Scenario<TWidget extends Widget, TArgs extends StoryArgs<TWidget>>
SingleArg<T>
Story<TWidget extends Widget, TArgs extends StoryArgs<TWidget>>
StoryArgs<T>
StringArg
StringField
Field that builds TextFormField for String values.
TextScaleAddon
TextScaleMode
An Addon for changing the active MediaQueryData.textScaleFactor via MediaQuery.
ThemeAddon<T>
An Addon for changing the active custom theme. A builder must be provided that returns an InheritedWidget or similar Widgets.
ThemeMode<T>
TimeDilationAddon
TimeDilationMode
An Addon for changing timeDilation.
VirtualKeyboard
Display a simulated on screen keyboard at the bottom of a child widget.
Widgetbook
Describes the configuration for your Widget library.
WidgetbookCloudIntegration
Integration for Widgetbook Cloud, that is used to sync addons and knobs information with the host.
WidgetbookIntegration
Integrations are like lifecycle hooks that notifies implementer about WidgetbookState changes.
WidgetbookState
ZoomAddon
An Addon for zoom/scaling.
ZoomMode

Enums

ColorSpace
DeviceType
A device form factor.
FieldType

Functions

buildGenericDesktopMonitorDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, double pixelRatio = 2.0, EdgeInsets? rotatedSafeAreas, GenericDesktopMonitorFramePainter? framePainter}) DeviceInfo
Creates a generic desktop monitor device definition for the given name, target platform and screenSize. The windowPosition defines the position of a virtual window with a window frame adapted for the given platform.
buildGenericLaptopDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, double pixelRatio = 2.0, EdgeInsets? rotatedSafeAreas, GenericLaptopFramePainter? framePainter}) DeviceInfo
Creates a generic laptop device definition.
buildGenericPhoneDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericPhoneFramePainter framePainter = const GenericPhoneFramePainter()}) DeviceInfo
Creates a generic phone device definition.
buildGenericTabletDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericTabletFramePainter framePainter = const GenericTabletFramePainter()}) DeviceInfo
Creates a generic tablet device definition.
cupertinoAppBuilder(BuildContext context, Widget child) Widget
materialAppBuilder(BuildContext context, Widget child) Widget
widgetsAppBuilder(BuildContext context, Widget child) Widget

Typedefs

AppBuilder = Widget Function(BuildContext context, Widget child)
ArgBuilder<T> = T Function(BuildContext context)
ArgsBuilder<TWidget extends Widget, TArgs extends StoryArgs<TWidget>> = TWidget Function(BuildContext context, TArgs args)
ChildBuilder = Widget Function(BuildContext context, Widget child)
LabelBuilder<T> = String Function(T value)
SetupBuilder<TWidget extends Widget, TArgs extends StoryArgs<TWidget>> = Widget Function(BuildContext context, TWidget widget, TArgs args)
ThemeBuilder<T> = Widget Function(BuildContext context, T theme, Widget child)