ui_catalog library
The catalog page: a browsable index of your previews.
What this is for, stated plainly, because it changed. UICatalog is
what fw run previews build-web mounts — it is the page's shell, and that
is the supported way to reach it. Mounting it yourself still works and is
still tested, but nothing is designed around it any more: the generated
page is discovered from @Preview annotations, where the widget takes a
hand-written map, and the map is the older half of the same tool.
Not the Previews tool. That is previews.dart and the Previews plugin
— a panel, a CLI and an MCP surface driving a guest engine. Previews is
where you work; this is what you publish for people who are not going to
run the tool.
It hosts the same previews. UICatalog renders whatever the scan found,
knobs and all, which is why Knobs is re-exported here, with the
PickerStyle its pickers take — context.knobs
reads the same on a catalog page as in a preview, because it is the same
thing being read. A PreviewShell's axes are drawn too, so a page published
to be read in a second language can actually be switched into one.
Classes
- Figma
- Knobs
- The controls an entry declares by asking for them while it builds.
- KnobsProvider
- What answers KnobsExtension.knobs below it.
- UICatalog
Enums
- FormFactor
-
Which device bucket an entry is shown in by the in-app
UICatalog. - PickerStyle
- How a picker asks to be drawn — a knob's, or a shell's axis in the top bar.
Extensions
- KnobsExtension on BuildContext
-
The controls this entry asks for while it builds —
context.knobs.bool(…).