previews library
Dev-only barrel of magic_starter component previews.
This is intentionally SEPARATE from the magic_starter.dart release barrel:
per the atomic-component contract, *.preview.dart files never join the
release barrel. A consumer's dev-only preview catalog imports THIS library
instead, behind a kReleaseMode / PREVIEW_ENABLED guard, so release builds
that do not reach it tree-shake every preview (and the components they pull
in only for preview).
starterComponentPreviews returns the full set as (label, slug, builder)
records from a FUNCTION (never a top-level const holding widget refs — the
dart-lang/sdk#33920 foot-gun), so the set stays droppable when unreferenced.
Functions
-
starterComponentPreviews(
) → List< StarterComponentPreview> -
Every magic_starter component preview, as
(label, slug, builder)records.
Typedefs
- StarterComponentPreview = ({WidgetBuilder builder, String label, String slug})
-
One registered starter component preview: a human
label, a URL-safeslug(the component folder name), and abuilderthat renders the component's variant matrix.