storybook_flutter library

Classes

BooleanKnobWidget
A knob widget that allows the user to toggle a boolean value.
BoolKnobValue
A knob value that allows the user to toggle a boolean value.
ContentsPlugin
Plugin that adds content as expandable list of stories.
CurrentStory
DeviceFrame
Simulate a physical device and embedding a virtual screen into it.
DeviceFrameDataNotifier
DeviceFramePlugin
Plugin that allows wrapping each story into a device frame.
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.
GenericDesktopMonitorFramePainter
GenericLaptopFramePainter
GenericPhoneFramePainter
GenericTabletFramePainter
Knob<T>
An abstract class that represents a control knob.
KnobsBuilder
Provides helper methods for creating knobs: control elements that can be used in stories to dynamically update its properties.
KnobsNotifier
KnobsPlugin
Plugin that adds story customization knobs.
KnobValue<T>
An abstract class that represents a control knob.
LayoutPlugin
LayoutProvider
NullableKnob<T>
A class that represents a nullable control knob.
NullableKnobsBuilder
A version of KnobsBuilder that creates nullable versions of all knobs.
Option<T>
Represents a single option for a SelectKnob.
OverlayController
Plugin
PluginOverlay
PluginPanel
SelectKnobValue<T>
A knob that allows the user to select an option from a list of options.
SelectKnobWidget<T>
A knob widget that allows the user to select a value from a list of options.
SliderKnobValue
A knob that allows the user to select a value from a range.
SliderKnobWidget
A knob widget that allows the user to select a value from a range.
Story
Storybook
StoryNotifier
Use this notifier to get the current story.
StringKnobValue
A knob that allows the user to edit a string value.
StringKnobWidget
A knob widget that allows the user to edit a string value.
ThemeModeNotifier
Use this notifier to get the current theme mode.
ThemeModePlugin
VirtualKeyboard
Display a simulated on screen keyboard at the bottom of a child widget.

Enums

DeviceType
A device form factor.
EffectiveLayout
Layout

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.
cupertinoWrapper(BuildContext _, Widget? child) Widget
Use this wrapper to wrap each story into a CupertinoApp widget.
initializePlugins({bool enableThemeMode = true, bool enableDeviceFrame = true, DeviceFrameData initialDeviceFrameData = defaultDeviceFrameData}) List<Plugin>
Use this method to initialize and customize built-in plugins.
materialWrapper(BuildContext _, Widget? child) Widget
Use this wrapper to wrap each story into a MaterialApp widget.

Typedefs

DeviceFrameData = ({DeviceInfo? device, bool isFrameVisible, Orientation orientation})
DoubleFormatter = String Function(double value)
A type definition for a function that formats a double value.
NullableWidgetBuilder = Widget? Function(BuildContext context)
OnPluginButtonPressed = void Function(BuildContext context)