WidgetbookInstance constructor
WidgetbookInstance({
- required AppInfoInstance appInfoInstance,
- required List<
CategoryInstance> categories, - ThemeInstance? lightThemeInstance,
- ThemeInstance? darkThemeInstance,
- List<
DeviceInstance> devices = const <DeviceInstance>[],
Creates a new instance of WidgetbookInstance
Implementation
WidgetbookInstance({
required AppInfoInstance appInfoInstance,
required List<CategoryInstance> categories,
ThemeInstance? lightThemeInstance,
ThemeInstance? darkThemeInstance,
List<DeviceInstance> devices = const <DeviceInstance>[],
}) : super(
name: 'Widgetbook',
properties: [
Property(key: 'appInfo', instance: appInfoInstance),
if (lightThemeInstance != null)
Property(key: 'lightTheme', instance: lightThemeInstance),
if (darkThemeInstance != null)
Property(key: 'darkTheme', instance: darkThemeInstance),
if (devices.isNotEmpty)
Property(
key: 'devices',
instance: ListInstance(instances: devices),
),
Property(
key: 'categories',
instance: ListInstance(instances: categories),
),
],
);