bodyOverlays property

List<Widget>? bodyOverlays
final

Optional overlay widgets placed between the body and the bars in the z-order Stack.

Use this for floating elements that should render above the body content but below the app bar and bottom bar. Each widget is typically wrapped in an AnimatedPositioned or Positioned. Like appBar and bottomBar, each overlay is wrapped in a GlassIsolationScope with defaultQuality: GlassQuality.premium so floating pills and action buttons render with their own premium glass layer out of the box.

Example: Apple Music's floating play bar pill:

GlassScaffold(
  bodyOverlays: [
    AnimatedPositioned(
      bottom: isMiniMode ? miniBottom : aboveBarBottom,
      left: 20, right: 20,
      child: PlayBarPill(),
    ),
  ],
  bottomBar: GlassTabBar.searchable(...),
  body: scrollContent,
)

Implementation

final List<Widget>? bodyOverlays;