widgetbook2 library
Classes
- AppInfo
- Apple
- Collection of Apple devices
- CupertinoThemeAddon
- CupertinoThemeSetting
-
CustomThemeAddon<
T> -
CustomThemeSetting<
T> - Desktop
- Collection of all general desktops
- Device
- A virtual device that will rendered when a story is previewed
- DeviceAddon
- DeviceFrame
- Simulate a physical device and embedding a virtual screen into it.
- DeviceFrameBuilder
- 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.
- DeviceSelection
- DeviceSize
- Defines the size of a device
- ExpandableOrganizer
- ExpandableOrganizer is an abstract model which can host WidgetElements and/or Folders
- GenericDesktopMonitorFramePainter
- GenericLaptopFramePainter
- GenericPhoneFramePainter
- GenericTabletFramePainter
-
Knob<
T> - This allows stories to have dynamically adjustable parameters.
- KnobsNotifier
- Updates listeners on changes with the knobs
- KnobWrapper
- Provides the description to the Knob
- LocalizationAddon
- LocalizationData
- LocalizationSetting
- MaterialThemeAddon
- MaterialThemeSetting
-
Option<
T> - Data object that is used within the options knob
- Organizer
- Organizer is an abstract model which helps to structure Categories, WidgetElements and Stories in the folder tree.
- Resolution
- The resolution of a device defined by the nativeSize of the Device and its scaling factor.
- Samsung
- Collection of Samsung devices
- TextScaleAddon
- TextScaleSetting
-
ThemeAddon<
T> -
ThemeSetting<
T> - VirtualKeyboard
- Display a simulated on screen keyboard at the bottom of a child widget.
-
Widgetbook<
CustomTheme> - Describes the configuration for your Widget library.
- WidgetbookCategory
- Categories help to organize WidgetElements and Stories into different areas.
- WidgetbookComponent
- WidgetbookDeviceFrame
- WidgetbookFolder
- A folder in the folder tree.
- WidgetbookFrame
- Declares a frame for a phone displaying its characteristics.
- WidgetbookFrameBuilder
-
WidgetbookTheme<
CustomTheme> - WidgetbookUseCase
- UseCases represent a specific configuration of a widget and can be used to check edge cases of a Widget.
Enums
- DeviceType
- Category of different device types.
Extensions
- CupertinoThemeExtension on BuildContext
- CustomThemeExtension on BuildContext
- DeviceExteionsion on BuildContext
- DeviceInfoExtension on DeviceInfo
- FrameBuilderExtension on BuildContext
- Knobs on BuildContext
- LocalizationExtension on BuildContext
- MaterialThemeExtension on BuildContext
- TextScaleExtension on BuildContext
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
, targetplatform
andscreenSize
. ThewindowPosition
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.
-
configureCupertinoAddons(
{required CupertinoThemeSetting themeSetting, required TextScaleSetting textScaleSetting, required LocalizationSetting localizationSetting, required DeviceSelection deviceSetting}) → List< WidgetbookAddOn> -
configureMaterialAddons(
{required MaterialThemeSetting themeSetting, required TextScaleSetting textScaleSetting, required LocalizationSetting localizationSetting, required DeviceSelection deviceSetting}) → List< WidgetbookAddOn> -
mapDeviceToDeviceInfo(
Device device) → DeviceInfo