Liquid Glass Easy

App bar

A floating capsule with your page running under it.

LiquidGlassAppBar is a single lens wrapped around leading, title and actions. Place it in a top-aligned Stack child, or in the appBar: slot of a LiquidGlassScaffold.

Dart
LiquidGlassView(
  backgroundWidget: myScrollingPage,   // what the bar refracts
  child: Align(
    alignment: Alignment.topCenter,
    child: LiquidGlassAppBar(
      leading: const Icon(Icons.menu_rounded),
      title: const Text('Library'),
      actions: const [Icon(Icons.search_rounded)],
      width: 356,
    ),
  ),
)
ParameterDefaultWhat it does
leadingnullStart slot — a menu or back button.
titlenullUsually a Text; inherits the bar style.
actions[]End slot, laid out in order.
centerTitletrueFalse left-aligns it beside leading.
height / width56 / 360Height also sets the default corner radius (height / 2).
horizontalPadding / actionSpacing14 / 8The inset at the ends, and the gap between actions.
foregroundColornullReaches icons and text through an IconTheme and a DefaultTextStyle. Left null, it defers — which is what lets adaptivity drive it.
touchnullMakes the bar itself answer a press.

Comments

Comments are GitHub Discussions — reply from either place.