liquid_shell library

Adaptive navigation shell with a Liquid Glass look for iOS and Android.

Classes

LiquidAlertAction<T>
One button of showLiquidAlert or showLiquidActionSheet. The dialog's future completes with value when the user picks it.
LiquidBackButton
A 44pt glass circle with a back chevron. Pops the nearest navigator with maybePop by default, so a page's PopScope guard runs.
LiquidBadge
A badge on a destination: a count or a dot.
LiquidChromeDetails
Everything a LiquidChromeBuilder needs to draw a slot.
LiquidContentInset
Padding(LiquidShellScope.contentPaddingOf(context)), for content that does not scroll.
LiquidCountBadge
A numeric badge. See LiquidBadge.count.
LiquidDestination
One navigation destination: a tab bar cell and a sidebar row.
LiquidDotBadge
A dot badge. See LiquidBadge.dot.
LiquidGlass
A glass surface.
LiquidGlassPolicy
Chooses the tier and the renderer for every LiquidGlass.
LiquidGlassRenderer
Draws the background of a glass surface for one LiquidGlassTier.
LiquidGlassScope
Sets the LiquidGlassPolicy for a subtree.
LiquidGlassSignals
Everything LiquidGlassPolicy.resolve looks at besides the renderers.
LiquidGlassSpec
What a LiquidGlassRenderer needs to draw one surface.
LiquidGlassTheme
Colours and shapes of liquid_shell glass.
LiquidHideChrome
While mounted with enabled inside a shell, and while on screen, hides all chrome (bar, toggle, sidebar) and zeroes the insets. For full-frame pages pushed inside a branch. Requests are reference-counted. Outside a shell it does nothing.
LiquidNativeSidebarFooter
The native sidebar footer: a profile-style row pinned to the bottom of the native sidebar. Native chrome cannot host Flutter widgets, so this is data; LiquidShell.sidebarFooter still draws the Flutter sidebar's.
LiquidNoChrome
For pages pushed ABOVE the shell (on the root navigator): publishes LiquidShellScopeData.none to child, so its insets ignore the chrome underneath. The window controls still pass through: they belong to the window.
LiquidPage
One page of a tab: its title for the navigation bar, and the back button when its navigator can pop.
LiquidPageAction
A trailing action in a LiquidPage's bar: a native bar button on iOS 26+ with native chrome, a glass circle in the Flutter bar elsewhere.
LiquidPlatformSignals
Accessibility and power signals read from the operating system.
LiquidSearch
The search tab's field. Give it to LiquidShell.search with a destination whose role is LiquidDestinationRole.search.
LiquidSearchChromeDetails
The search part of LiquidChromeDetails.
LiquidSearchController
The search query as a ValueListenable (Flutter's stream of values), plus commands for the shell's field. Owned by the app, so the query outlives tab switches.
LiquidSearchScopeBar
The search scopes ("All | Songs | Places") as a LiquidSegmentedControl, bound to controller's scopeIndex. Place it at the top of the search page's content.
LiquidSearchValue
The search field's state.
LiquidSegment
One segment of a LiquidSegmentedControl.
LiquidSegmentedControl
A segmented control drawn after iOS 26's UISegmentedControl, with a liquid lens for its selection. Controlled: rebuild it with the index onChanged reports.
LiquidShell
An adaptive navigation shell with no router dependency.
LiquidShellBreakpoints
Width thresholds of the shell, in logical pixels of the shell's own constraints (not the screen).
LiquidShellScope
Reads the nearest LiquidShell.
LiquidShellScopeData
What the nearest LiquidShell tells its body.
LiquidShellStrings
Every user-visible string of the shell, with English defaults.
LiquidSidebar
A full-height glass sidebar of destinations.
LiquidTabAction
An action at the trailing end of the tab bar (for example search). Also shown as the first sidebar row while the sidebar is visible.
LiquidTabBar
A floating glass pill of destinations, with an optional separate glass circle for a LiquidTabAction.
LiquidWindowControls
How much of the top-leading corner the iPadOS 26 window controls (the close, minimise and resize cluster of a windowed app) cover, in logical pixels, measured from the safe area.
LiquidWindowControlsClearance
Moves child past the iPadOS 26 window controls when its row is under them: a start padding of LiquidWindowControls.indentFor(rowTop:).

Enums

LiquidAlertActionStyle
How an alert or action-sheet action looks. The platform decides where a cancel action sits.
LiquidChromeKind
Which chrome the shell shows.
LiquidChromeSlot
The two places the shell draws chrome.
LiquidDestinationRole
What a destination is.
LiquidDialogPresentation
Who draws a dialog.
LiquidGlassTier
How a glass surface is drawn, from richest to plainest.
LiquidNativeChrome
Whether a LiquidShell may hand its chrome to the platform.
LiquidPlacement
Where a destination appears.
LiquidSearchPhase
Where the search is.
LiquidSizeClass
The two width classes of the shell.
LiquidTabBarPosition
Where a LiquidTabBar sits, which sets its cell layout.

Constants

kLiquidNarrowWidth → const double
Below this width (logical pixels) the bottom tab bar is narrow: LiquidShell shrinks the row margin to 8, so 5 tabs plus a trailing action keep hit targets of at least 44pt down to 320 at text scale 1 (iPad Slide Over, ⅓ Split View, small phones). Larger text grows the pill, and the square trailing circle with it, so cells can drop below 44pt there.
kNativeHandoverTimeout → const Duration
How long after native received the engaged config the shell waits for its ack and its new top inset before it hands its page bar over anyway.

Properties

debugLiquidGlassCanRefractOverride ↔ bool?
Test hook replacing the shader-filter probe. null (the default) probes.
getter/setter pair

Functions

debugResetLiquidGlassSignals() → void
Test hook: forgets the platform signals, the stream and the once-only debug logs, so the next test starts clean.
debugResetLiquidNative() → void
Forgets the process-wide native chrome link and window-controls source, and the remembered native dialog refusals, so the next shell asks LiquidShellPlatform.instance afresh. For tests that swap the platform instance; call it in tearDown.
showLiquidActionSheet<T>(BuildContext context, {required List<LiquidAlertAction<T>> actions, String? title, String? message, Rect? anchor, LiquidDialogPresentation presentation = LiquidDialogPresentation.auto, LiquidShellStrings strings = const LiquidShellStrings()}) → Future<T?>
Shows an action sheet and completes with the chosen action's value.
showLiquidAlert<T>(BuildContext context, {required String title, required List<LiquidAlertAction<T>> actions, String? message, LiquidDialogPresentation presentation = LiquidDialogPresentation.auto}) → Future<T?>
Shows an alert and completes with the chosen action's value.

Typedefs

LiquidBeforeDestinationChange = Future<bool> Function(int index)
Decides whether a user selection may proceed. Return false to cancel.
LiquidChromeBuilder = Widget Function(BuildContext context, LiquidChromeDetails details, Widget defaultChrome)
Replaces or wraps the shell's chrome for one slot.