storybook_toolkit
1.3.2, released 2 years ago by an unverified publisher
Flutter widget showcase and isolated preview tool
WASM-ready
What it does
Storybook Toolkit lets you build and preview widgets in isolation, with device frames and theme switching. It also supports golden tests and plugin extensibility.
AI-written summary of version 1.3.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to showcase or test widgets in isolation
- Want to generate golden tests for UI components
- Need to preview widgets on multiple device frames
- Looking for a plugin-based devtool for Flutter
Skip it when
- You only need a simple widget library without preview features
- Your project already uses a different storybook implementation
Strengths
- Plugin architecture allows adding features easily
- Built-in device frame simulation
- Integrated golden test support
- Supports theme and localization changes
Weaknesses
- Only works with Flutter
- Requires adding several dependencies
- No code generation features
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 10
```dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) =>
Storybook(
stories: [
Story(
name: 'Counter',
builder: (context) => CounterPage(
title: context.knobs.text(label: 'Title', initial: 'Counter'),
enabled: context.knobs.boolean(label: 'Enabled', initial: true),
),
),
],
);
}
```Works with
Packages commonly used together with storybook_toolkit: ones it builds on, ones built on it, and its own family.
- go_routerstorybook_toolkit depends on itDeclarative routing package for Flutter based on Navigation 2 supporting deep links and URL-based navigation.
- nestedstorybook_toolkit depends on itWidget that flattens deeply nested widget trees into a list of children.
- providerstorybook_toolkit depends on itA lightweight wrapper around InheritedWidget for state management
- inspectorstorybook_toolkit depends on itA Flutter package for inspecting widgets, colors, and sizes during debugging and QA testing.
- device_frame_plusstorybook_toolkit depends on itMockups and frames for common devices to preview and test Flutter apps.
- any_syntax_highlighterstorybook_toolkit depends on itA lightweight convention-based syntax highlighting widget for text code.
- pointer_interceptorstorybook_toolkit depends on itA widget to prevent clicks from being swallowed by underlying HtmlElementViews on the web.