Liquid Glass Easy

Scaffold

The page that captures itself.

LiquidGlassScaffold is the pipeline with the slots already wired. It captures its own body and hands that to everything floating over it, so bars and lenses refract your page on both engines — including the web, where nothing else can.

Dart
LiquidGlassScaffold(
  body: IndexedStack(
    index: index,
    children: const [HomeTab(), BrowseTab(), SavedTab(), YouTab()],
  ),
  appBar: const LiquidGlassAppBar(title: Text('Library')),
  bottomNavigationBar: LiquidGlassTabBar(
    items: items,
    selectedIndex: index,
    onChanged: (i) => setState(() => index = i),
  ),
)
Slot / knobWhat goes in it
bodyYour page. This is what gets captured and refracted.
appBarA LiquidGlassAppBar, floated over the body.
bottomNavigationBarThe bar, floated over the bottom.
bottomNavigationBarActionA trailing action beside the bar — a compose or record button.
floatingActionButtonA LiquidGlassFab, placed by floatingActionButtonAlignment and kept clear of the bottom bar by floatingActionButtonClearance.
dialogA dialog shown as part of the scaffold rather than as a route — with its own barrier colour, dismiss callback and transition.
lensesFree-floating lenses positioned over the body.
adaptivityDrives every piece of chrome from one background verdict — see Adaptivity.
batchtrue by default: the chrome shares one backdrop read — see Batch. A sheet or dialog presented from inside joins it only with batch: true on its own call.
realTimeCapture, pixelRatio, useSync, refreshRateThe same capture knobs a LiquidGlassView takes, for the same reasons.

Comments

Comments are GitHub Discussions — reply from either place.