Search packages, repositories and app categories

Package detailsv0.1.9

flutterbook

A storyboard tool to accelerate the development of Flutter widgets.

AndroidiOSmacOSWindowsLinux
30-day downloads
235
Likes
42
Pub points
130

Install package

flutter pub add flutterbook

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

FlutterBook is a storyboard tool designed to accelerate the development of Flutter widgets by enabling component-driven UI design. It allows developers and designers to visualize, test, and iterate on individual widgets in isolation, with real-time previews across multiple platforms. Built for rapid prototyping, it supports dynamic configuration and state management within a visual interface. The tool integrates seamlessly into Flutter workflows via a simple pub add command and is open-source, encouraging community contributions. Ideal for teams focused on consistent, reusable UI components.

Use cases

  • Rapid UI prototyping
  • Component library development
  • Cross-platform widget testing
  • Design system implementation
  • Collaborative UI reviews

Key features

  • Real-time preview across platforms
  • Interactive widget configuration
  • Support for multiple device sizes
  • Built-in state management
  • Open-source and extensible

Suitable for

  • UI/UX designers working with Flutter
  • Frontend developers building reusable components
  • Teams using a design system
  • Product teams iterating on UI mockups
  • Developers seeking faster feedback loops

Considerations

  • Requires integration into existing Flutter project
  • Limited to widget-level visualization
  • Not a full design tool like Figma
  • Best suited for component-focused workflows
  • May need additional setup for complex states

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutterbook

Flutterbook

A storyboarding tool to accelerate the development of Flutter widgets. Inspired by Storybook.js.

The package is built to support Windows and Web layouts. There is no support for mobile support at the moment. This is new and still under heavy development, expect many changes to occur with usage.

License: MIT


Go subscribe to my YouTube channel to support development.

MOONSDONTBURN Header

Demo

Demo Link Here

Overview ✨

Creating the Main

Start by creating the storyboard widget. This will wrap the Flutterbook widget so that when it is edited, it will hot reload.

class Storyboard extends StatelessWidget {
  const Storyboard({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return FlutterBook(
      categories: [
          // organizers ...
      ],
    );
  }
}

After creating the Storyboard widget, you can run it by using the main. I recommend making another file named main_storyboard.dart to maintain your storyboard.

void main() {
  runApp(const Storyboard());
}
// Or run it directly, but this will cost the hot reload.
// void main() {
//   runApp(const Flutterbook(categories:[...]));
// }
How to add Widgets

To add widgets, you simply put Organizers, aka Category, Folder, Component, and ComponentState.

The hierarchy goes

Category > Folder > Component > ComponentState

but you may also do

Category > Component > ComponentState

or

Category > Folder > Folder > Component > ComponentState

Here is a complex example of a single Category. In the example, we use the builder where we are able to access different controls.

Category(
    categoryName: 'LIBRARY',
    organizers: [
    Folder(
        folderName: 'Charts',
        organizers: [
        Component(
            componentName: 'LineGraph',
            states: [
            ComponentState.child(
                stateName: 'Default Container',
                child: Container(),
            ),
            ],
        ),
        ],
    ),
    Component(
        componentName: 'Button',
        compenentMarkdoown: """##A global button component""",
        states: [
        ComponentState(
            stateName: 'Primary',
            markdown: """Used for the main action to be performed"""
            codeSample:  r'''
Button.primary(
  child: Text('Primary Button'),
  onPressed: () {},
);
'''
            builder: (context, c) {
            return Center(
                child: SizedBox(
                width: c.number(
                    label: 'Number',
                    initial: 50,
                    min: 50,
                    max: 250,
                ),
                height: c.number(
                    label: 'height',
                    initial: 50,
                    min: 50,
                    max: 250,
                    description: 'random stuff',
                ),
                child: CupertinoButton.filled(
                    onPressed: c.boolean(
                    label: 'boolean',
                    initial: true,
                    )
                        ? () {}
                        : null,
                    child: Text(
                    c.text(label: 'Text', initial: 'Hello World'),
                    ),
                ),
                ),
            );
            },
        ),
        ],
    ),
    ],
),
That's it!

Roadmap 🚧

  • [ ] Mobile Support
  • [ ] 100% Code Coverage Testing
  • [X ] Documentation Support in ComponentState's
  • [ ] Better Docs
  • [X ] Device Previews
  • [ ] Shareable Handoffs
  • [ ] Optimization

Contributors 🔥

Your name could be here 😉

Categories

Dependencies

Dependency list 8 items

Source repository

Projects using this package

No data available yet.