Werkbank

A powerful tool that helps you develop, test, visualize, and organize your Flutter UI components.

Documentation โ€ข Get Started โ€ข Web Demo

Note

AI Disclosure

Most of the code was written from July 2024 to July 2025 without major use of AI. We did use Next Edit Suggestions, but not counting that, the vast majority of the code is human written. The documentation is also human written and structured, just with some typo fixing, grammar correction and minor polishing done with AI. Werkbank is made with passion, and we want it to stay that way.

Features

๐Ÿงฉ Use Cases

  • Write use cases for your UI components to view and test them in isolation.
  • Visually navigate use cases in a grid overview that shows thumbnails of your widgets, updating in real time.
  • Sort them in a tree hierarchy and navigate using it.
  • Search for use cases, even with typos or abbreviations.
  • Browse Recently Used or Recently Added on the home page.
  • Categorize your use cases using Tags.

An animation showcasing use cases.

๐ŸŽ›๏ธ Knobs

  • Configure your use case widgets using knobs that control your widget and can be controlled by your widget simultaneously.
  • Define knob presets to configure predefined sets of values for your knobs and view the widget in all its possible states simultaneously using the overview.
  • There are knobs for most common types, like double, int, bool, String, List<T>, etc., and their nullable counterparts.
  • There are even special knobs for AnimationControllers and FocusNodes.

An animation showcasing knobs.

๐Ÿ“ Constraints

  • Interactively change the BoxConstraints passed to your widgets and see how your widgets react to different sizes.
  • Or change the constraints more precisely using input fields.
  • Define custom presets for the constraints.
  • Or use predefined device presets for common device sizes.
  • Use zoom and pan gestures to view use cases in sizes larger than the viewport.

An animation showcasing the ability to set constraints.

โ™ฟ Accessibility

  • Inspect the semantic nodes of your use cases and all of their properties using interactive semantics overlays.
  • Change Text Scale and Bold Text to test under different accessibility conditions.
  • Simulate Color Blindness to verify sufficient contrast for all users.

An animation showcasing tools for accessibility.

๐Ÿ–ผ๏ธ Theme, Background and Localization

  • Change the theme of your use cases, even while viewing them in the overview.
  • Define default backgrounds for your use cases or select from predefined backgrounds to override the default ones.
  • Switch the locale used by your use cases.

An animation showcasing theming and more.

๐Ÿ› ๏ธ Customize your Werkbank

  • Resize or collapse panels.
  • Enter a focus mode for no distractions.
  • Toggle between light mode and dark mode in your Werkbank.
  • Reorder and collapse panels to prioritize the ones you need most.

An animation showcasing the customizability of Werkbank.

And much more!

  • ๐Ÿ” Zoom and Pan
    • Navigate your use cases using Figma-like zoom and pan gestures.
  • ๐Ÿท๏ธ Metadata
    • Augment use cases with metadata such as descriptions, tags, and URLs.
  • ๐Ÿงช Tests
    • Use your use cases for golden tests and widget tests by displaying them without the UI of Werkbank.
  • ๐Ÿ› ๏ธ Addons
    • Create your own Addons using the extremely powerful Addon API, which is also used to implement knobs, constraints selection, semantics inspection, and much more.
  • ๐ŸŒ Deployment
    • Deploy your Werkbank using Flutter's web support to share it with your team and use it for design reviews.
  • ๐Ÿ”„ Hot Reload
    • Update everything with just a hot reload.

Writing Use Cases

To get a rough idea of how use cases are written, take a look at the following example. For more detailed explanations, visit our Documentation.

// Use cases are written as functions returning a `WidgetBuilder`.
WidgetBuilder sliderUseCase(UseCaseComposer c) {
  //                        ^^^^^^^^^^^^^^^^^
  // Use the `UseCaseComposer c` to customize the use case in many ways.

  // Add metadata to augment the use case.
  c.description('A super cool slider!');
  c.tags(['input', 'slider']);
  c.urls(['https://api.flutter.dev/flutter/material/Slider-class.html']);

  // Set the default background for the use case.
  c.background.named('Surface');

  // Customize the thumbnail in the overview to improve looks or avoid overflows.
  c.overview.minimumSize(width: 150, height: 50);

  // Set initial `BoxConstraints` and presets for the use case.
  // They can still be interactively changed in the UI.
  c.constraints.initial(width: 200);
  c.constraints.preset('Wide', width: 400);

  // Define knobs to control the widget's properties.
  final valueKnob = c.knobs.doubleSlider(
    'Value',
    initialValue: 0.5,
  );

  // Return a `WidgetBuilder` that builds your widget.
  return (context) {
    return Slider(
      // Use knob values in the widget.
      value: valueKnob.value,
      // Even SET knob values in the widget.
      onChanged: (value) => valueKnob.value = value,
    );
  };
}

Where to Go Next?

  • ๐Ÿ“– Documentation
    • Learn everything about what Werkbank is and its technical details.
  • ๐Ÿš€ Get Started
    • If you already roughly know what Werkbank is, jump directly into setting up your Werkbank app.
  • ๐ŸŒ Example Werkbank Web Demo
    • Try out a Werkbank app in your browser.
  • ๐Ÿ› ๏ธ Example Werkbank Code
    • Take a look at the code of the example web demo above and use it as a starting point for your own Werkbank app.

Libraries

werkbank
Werkbank;