Article
Your brand, your widgets: the modern Flutter stack for custom design libraries

Material and Cupertino get a Flutter app off the ground fast. But they are Google’s and Apple’s design languages, not your brand’s. With the Flutter team moving both libraries out of the core framework and into their own packages, building a custom design system has become easier and more important than ever.
At Flutter Create, Craig Labenz from the Flutter team, Leo Farias (creator of Mix) and our Co-Founder and CEO Lucas Josefiak walked through the modern stack for creating, styling and testing your own design library in Flutter. Here is what they covered, and how Widgetbook fits into each step.
Watch the full session: “The new way to build custom design libraries with Flutter” on YouTube
The foundation: raw widgets
As part of the decoupling effort, the Flutter team is strengthening the base layer in widgets.dart. New raw widgets such as RawMenuAnchor ship with the behavior and accessibility you need, but no visual opinion. Craig described them as a wall with a coat of primer: not very pretty, but ready for you to paint.
Raw widgets are added as they are needed or requested. If one is missing, you can file an issue or contribute it yourself.
Outside the framework, pub.dev already offers plenty of widget sets: shadcn_ui, fluent_ui for a Windows look, yaru for Ubuntu and many more. But adapting an existing design system to your brand is often harder than starting from a blank canvas.

Mix and Remix: the paint
If raw widgets are the primer, Leo put it simply: Mix is the paint. In plain Flutter, styling usually lives in the widget tree next to your content and interactions. Mix moves it into a styling layer you own, with styles you can reuse and combine. Underneath, it is still all Flutter widgets.

The same padding, color and rounded corners you would write on a Container become a reusable BoxStyler. Change the radius in the shared style, and every box built from it updates. Styles also respond to context: a different fill in dark mode, a shadow on hover, a smooth animated transition and a slight tilt are all defined in the style. Your widget doesn’t need to check brightness or track hover state.

Remix brings Mix and the raw widgets together: components with behavior and accessibility built in, and styling you control. Leo built a button that lifts on hover and gives feedback when pressed. He then reused it as a green “Accepted” button that collapses to an icon and expands on hover. Taken further, Remix lets you build an entire design system the way Material and Cupertino are built. The first one is Fortal, named after Leo’s hometown of Fortaleza.

Once you have your own design system, you need to verify that it works and that you aren’t shipping regressions. That’s where Widgetbook comes in.
Widgetbook: a catalog for your design library
The framework gives you the primitives, and Mix gives you a way to style them. What you end up with is a custom design library. The next question is how to visualize and test it.

Widgetbook turns your widget catalog into a browsable, interactive app. You set it up as a separate Flutter app in your repo. Declare a Meta for a widget, run build_runner, and Widgetbook generates a type-safe story class from the widget’s constructor:
Each story is one state of your widget that you can preview in Widgetbook. Every constructor parameter becomes a form field, which we call an arg. Change a string, a double or an enum, and the widget rebuilds immediately. There is no app to run, no screen to navigate to and no login to get past first.

Modes: 64 combinations per story
One widget in one state isn’t the interesting part. The full test matrix is. Widgetbook modes let you set the conditions a component has to work under. For example:
Mode | Values |
|---|---|
Theme | Light, Dark |
Viewport | Small iOS, Large Android, Tablet, Web |
Locale | EN, DE, ZH, AR |
Text scale | 100%, 200% |
That is 2 × 4 × 4 × 2 = 64 combinations, and every story runs through all of them. You can spot edge cases while you’re still developing. In the session, the PaymentRequestRow looked fine by default but broke on an iPhone SE at 200% text scale. The name got truncated and the “Pending” badge wrapped letter by letter.

The agentic loop: no human in the loop
Capturing your design system in Widgetbook stories also improves agentic engineering. Stories show coding agents what each component is and how to use it, so they stick to your design system instead of inventing new UI. They also close the loop on testing:
Widgetbook captures the design system.
The agent reads the stories.
The agent writes test scenarios for every permutation.
Tests fail on edge cases.
The agent reads the failures and fixes the code itself.

The agent checks the whole test matrix against the original Figma design. The PaymentRequestRow passes in the default configuration (light theme, iPhone SE, English, 100% text scale) but fails at 200% text scale. The same test run catches accessibility violations, such as a reject button with a 32×32 tap target and no semantic label.
The agent reads those failures, applies fixes and runs again until everything is green. That’s deterministic feedback in seconds, with no human in the loop.

Widgetbook Cloud: review is the new bottleneck
Agents generate code faster than ever, so review becomes the bottleneck. Widgetbook Cloud checks every pull request and catches every visual change automatically. Humans can then quickly judge whether the agent, or we, made only the intended changes.
Reviewers open the build straight from the pull request and step through the changes in their browser. That means designers and other stakeholders can review real components and screens without installing Flutter, cloning the repo or running the app.

Next to the visual diff, Widgetbook Cloud also shows accessibility regressions. In the demo, the semantic label “Accept” had been dropped from a button. A visual diff would never show that. Approve the review, the Widgetbook check in your CI turns green, and you can merge with confidence.
The modern Flutter UI stack
Put together, the stack looks like this:
Flutter framework: the primitives, with raw widgets that handle behavior and accessibility.
Mix: a styling layer of your own.
Widgetbook: a catalog of your custom design library.
Widgetbook Cloud: a UI testing and review platform, so you ship the best version of your app.

Material and Cupertino will keep getting apps off the ground. But if your product has its own design language, you now have a complete toolchain to build, style, test and review it.




