playgrounder 0.3.0 copy "playgrounder: ^0.3.0" to clipboard
playgrounder: ^0.3.0 copied to clipboard

An opinionated playground builder for Flutter components: live preview, presets, and knobs.

Changelog #

0.3.0 - 2026-09-01 #

DEPRECATED: PlaygroundStyle and PlaygroundStyleScope still work and are adapted onto the new seam, so existing code runs unchanged. Both are removed in 0.4.0.

Migrate by setting one builder per slot you actually overrode:

// before
class MyStyle extends PlaygroundStyle {
  @override
  Widget buildActionButton(BuildContext context, {...}) => MyButton(...);
}
PlaygroundStyleScope(style: const MyStyle(), child: child)

// after
Widget myActionButton(BuildContext c, PlaygroundActionDetails d) =>
    MyButton(label: d.label, icon: d.icon, onPressed: d.onPressed);

PlaygroundTheme(
  data: const PlaygroundThemeData(actionButtonBuilder: myActionButton),
  child: child,
)

The slots are tabsBuilder, presetRowBuilder and actionButtonBuilder; null means the Material default, so overriding one leaves the others alone and no subclassing is needed. Hoist builders to top-level or static functions — function equality is by identity, so an inline closure makes a new theme every build.

stageBackground was a method resolving a colour from a context; it is now a nullable Color field on PlaygroundThemeData, since the right stage tint is a fact about the design system's ColorScheme rather than a per-build computation. Null still resolves to surfaceContainerHighest.

Playground.inspectorWidth and Playground.splitBreakpoint are now nullable and fall back to the theme, so a design system states them once instead of at every playground. Passing them per playground still works and still wins.

Refactors #

  • carry the chrome seam inside a theme (be8e0f2)

0.2.0 #

BREAKING: Playground.actions is replaced by a single footer slot that accepts any widget. Actions are now prefab footer content: migrate Playground(actions: [...]) to Playground(footer: PlaygroundActions(actions: [...])). PlaygroundActions is exported for this; it still styles each button through the ambient PlaygroundStyle, and the footer region supplies the divider and inset once, so composing actions with other pinned content does not double the chrome.

0.1.0 #

Initial release: Playground, PlaygroundPreset, PlaygroundAction, PlaygroundStyle and PlaygroundStyleScope, and the StepKnob, SwitchKnob, ScaleKnob (with ScaleStep), DropdownKnob, KnobGroup, and KnobRelevance inspector controls. Playground exposes inspectorWidth and splitBreakpoint for tuning the docked layout.

0
likes
160
points
313
downloads

Documentation

API reference

Publisher

verified publisherluisburgos.xyz

Weekly Downloads

An opinionated playground builder for Flutter components: live preview, presets, and knobs.

Repository (GitHub)
View/report issues
Contributing

Topics

#playground #preview #knobs #design #widget

License

MIT (license)

Dependencies

equatable, flutter

More

Packages that depend on playgrounder