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.

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;