liquid_shell 0.1.0-dev.13
liquid_shell: ^0.1.0-dev.13 copied to clipboard
Adaptive navigation shell with a Liquid Glass look for iOS and Android. A floating tab bar on phones and a glass sidebar on tablets, with no router dependency.
liquid_shell #
Adaptive navigation shell with a Liquid Glass look for iOS and Android: a floating glass tab bar on phones, a glass sidebar on tablets, and no router dependency.
| iPhone | iPad landscape | Android | |
|---|---|---|---|
| Light | [iPhone, light] | [iPad landscape, light] | [Android, light] |
| Dark | [iPhone, dark] | [iPad landscape, dark] | [Android, dark] |
Features #
- One shell, every width. A bottom glass pill below 700pt and on landscape phones; a glass sidebar from 700pt, over the content in portrait and beside it in landscape from 1024pt, with a top pill and a toggle while it is hidden.
- A floating glass tab bar measured against iOS 26: native slot geometry, a liquid lens that follows your finger, minimize on scroll (doc/tab_bar.md).
- Router-agnostic. You pass
selectedIndex,onDestinationSelectedand abody. Works withIndexedStack,Navigatoror any router. - Badges, sidebar-only destinations, sidebar header and footer, a trailing action (for example compose) and an async "Discard changes?" guard.
- Per-tab state survives sidebar toggles, rotation and size changes: the body is never rebuilt under a new parent.
- Narrow windows. Down to 320pt (Slide Over, ⅓ Split View, small phones), 5 tabs plus a trailing action keep 44pt-wide cells at text scale 1, and the labels shrink to fit.
- Liquid glass by default: the package's own lens shader on Impeller (iOS, Android 10+), with automatic frosted fallback (no Impeller, low-end or GLES-only Android, battery saver, Low Power Mode, slow frames) and solid for Reduce Transparency, Increase Contrast and disabled window blurs.
- Accessible: semantics, large-text icon-only cells with a large content
viewer, RTL, and every string replaceable through
LiquidShellStrings. - Native iOS 26 chrome, opt-in: the system's own
UITabBarControllertab bar and sidebar (with a native footer) on iPhone and iPad, the floating bottom bar at compact width; the Flutter chrome everywhere else. - Search tab: a real search tab, UIKit's own on iOS 26 (iPhone: the ⌕ becomes the field and the tabs collapse; iPad: the field under the title row rises when active), the same states in glass elsewhere.
- Pages and the glass back button:
LiquidPage, with a collapsing large title and up to three actions; UIKit's own navigation bar on every tab with native chrome. - Native alerts and action sheets on iOS 26 (
UIAlertController), the same glass drawn by Flutter elsewhere. - Window controls: on iPadOS 26 windowed apps, the shell's top row and your large titles move past the close/minimise/resize cluster.
- Runtime dependencies: Flutter and this plugin's own packages only (plus
meta, pinned by the Flutter SDK, for the generated iOS channel).
iOS and Android are supported and tested on CI. macOS, web, Windows and Linux are not tested: the shell has no native code there and draws the glass shown below.
| Platform | Look | Signals |
|---|---|---|
| iOS 15+ | Liquid glass pill and sidebar; native UITabBarController chrome on iOS 26 (opt-in) |
Reduce Transparency, Increase Contrast, Low Power Mode, iPadOS 26 window controls |
| Android 10+ | Liquid glass, as on iOS (frosted on Android 9 and lower: no Impeller) | Animations off / high contrast, battery saver, window blurs disabled (API 31+), low memory, no Vulkan 1.1 |
| macOS (not tested) | Liquid glass (Impeller is Flutter's default there) | None |
| Web, Windows, Linux (not tested) | Frosted glass (no Impeller shader filters by default) | None |
Install #
flutter pub add liquid_shell
- Flutter 3.44 or later.
- iOS 15.0 or later:
platform :ios, '15.0'inios/Podfile, andIPHONEOS_DEPLOYMENT_TARGET = 15.0for the Runner target. - Android minSdk 24.
- Native iOS 26 chrome is opt-in: add
LiquidShellNativeChrometoInfo.plist(see Native iOS chrome).
Quickstart #
A whole app: replace lib/main.dart of a new flutter create project with
it and run.
import 'package:flutter/material.dart';
import 'package:liquid_shell/liquid_shell.dart';
void main() => runApp(const MaterialApp(home: _Tabs()));
class _Tabs extends StatefulWidget {
const _Tabs();
@override
State<_Tabs> createState() => _TabsState();
}
class _TabsState extends State<_Tabs> {
int _index = 0;
@override
Widget build(BuildContext context) => LiquidShell(
destinations: const [
LiquidDestination(icon: Icon(Icons.home), label: 'Home'),
LiquidDestination(icon: Icon(Icons.settings), label: 'Settings'),
],
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
body: Center(child: Text('Tab ${_index + 1}')),
);
}
Pad your pages with LiquidShellScope.contentPaddingOf(context) so content
scrolls under the glass but starts and ends clear of it.
Icons. The tab bar draws selectedIcon ?? icon in every tab, as iOS
draws a filled symbol in every tab. Give each destination an outline
icon and a filled selectedIcon (Icons.home_outlined /
Icons.home); the sidebar switches between them by selection. See
doc/tab_bar.md.
Destination labels must be unique (a debug assert names any repeats). Put
the shell inside a route, for example MaterialApp.home or a router's shell
route, not in MaterialApp.builder: its tooltips need an Overlay.
Cases #
Every case is a screen in example/. Each snippet is
the inside of that screen's State class and compiles on its own: paste it
into the State of a new StatefulWidget in a file that imports
import 'package:flutter/material.dart';
import 'package:liquid_shell/liquid_shell.dart';
DemoPage and kDemoDestinations stand in for your own pages and
destinations; they are in
example/lib/support/demo_page.dart.
Each snippet is checked against its source in CI, and each image is a golden
test.
Every case with a real shell gives each destination and the trailing action
an sfSymbol, so on iOS 26 it runs with the
native chrome. The images show the Flutter chrome,
which the same code draws everywhere else. Custom chrome, the standalone widgets, the segmented control, the custom theme, the forced
tier, form factors and narrow width are about the Flutter chrome itself:
they keep it on iOS 26 too (nativeChrome: LiquidNativeChrome.off or a
chromeBuilder), and the example app says so on screen.
Three tabs over an IndexedStack #
The quickstart with real pages. An IndexedStack keeps every tab's state
(scroll position, text fields) while another tab is shown.
int _index = 0;
@override
Widget build(BuildContext context) {
return LiquidShell(
// sfSymbol: the native chrome's icon on iOS 26.
destinations: const [
LiquidDestination(
icon: Icon(Icons.home_outlined),
selectedIcon: Icon(Icons.home),
label: 'Home',
sfSymbol: 'house',
),
LiquidDestination(
icon: Icon(Icons.map_outlined),
selectedIcon: Icon(Icons.map),
label: 'Explore',
sfSymbol: 'map',
),
LiquidDestination(
icon: Icon(Icons.settings_outlined),
selectedIcon: Icon(Icons.settings),
label: 'Settings',
sfSymbol: 'gear',
),
],
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
body: IndexedStack(
index: _index,
children: const [
DemoPage(title: 'Home'),
DemoPage(title: 'Explore'),
DemoPage(title: 'Settings'),
],
),
);
}
[Three tabs in the glass bar]
Badges #
int _index = 0;
@override
Widget build(BuildContext context) {
const destinations = [
LiquidDestination(
icon: Icon(Icons.inbox_outlined),
selectedIcon: Icon(Icons.inbox),
label: 'Inbox',
badge: LiquidBadge.count(3),
sfSymbol: 'tray',
),
LiquidDestination(
icon: Icon(Icons.forum_outlined),
selectedIcon: Icon(Icons.forum),
label: 'Chats',
badge: LiquidBadge.count(120), // shows "99+"
sfSymbol: 'bubble.left.and.bubble.right',
),
LiquidDestination(
icon: Icon(Icons.notifications_outlined),
selectedIcon: Icon(Icons.notifications),
label: 'Alerts',
badge: LiquidBadge.dot(),
sfSymbol: 'bell',
),
];
return LiquidShell(
destinations: destinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
body: DemoPage(title: destinations[_index].label),
);
}
[Count, 99+ and dot badges]
Sidebar-only destinations #
LiquidPlacement.sidebarOnly destinations never appear in the tab bar. When
one is selected and the layout becomes compact, the shell calls
onSelectedDestinationHidden once so you can move elsewhere.
int _index = 0;
@override
Widget build(BuildContext context) {
return LiquidShell(
destinations: const [
...kDemoDestinations,
LiquidDestination(
icon: Icon(Icons.bar_chart),
selectedIcon: Icon(Icons.bar_chart),
label: 'Reports',
placement: LiquidPlacement.sidebarOnly,
sfSymbol: 'chart.bar',
),
LiquidDestination(
icon: Icon(Icons.archive_outlined),
selectedIcon: Icon(Icons.archive),
label: 'Archive',
placement: LiquidPlacement.sidebarOnly,
sfSymbol: 'archivebox',
),
],
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
// Phones have no sidebar: fall back to the first tab.
onSelectedDestinationHidden: (_) => setState(() => _index = 0),
body: DemoPage(title: 'Destination ${_index + 1}'),
);
}
[Sidebar with two sidebar-only rows]
Sidebar header and footer #
int _index = 0;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
sidebarHeader: Text('Acme Notes', style: theme.textTheme.titleLarge),
sidebarFooter: const ListTile(
leading: CircleAvatar(child: Text('A')),
title: Text('Ana Lima'),
subtitle: Text('ana@example.com'),
),
// The native sidebar (iOS 26) shows no Flutter widgets: its footer is
// data, and it has no header.
nativeSidebarFooter: LiquidNativeSidebarFooter(
title: 'Ana Lima',
subtitle: 'ana@example.com',
sfSymbol: 'person.crop.circle',
semanticLabel: 'Ana Lima, ana@example.com',
onPressed: () => setState(() => _index = 2),
),
body: DemoPage(title: kDemoDestinations[_index].label),
);
}
[Sidebar with a title and a profile footer]
Trailing action #
The action is a separate glass circle at the end of the tab bar, and the
first row of the sidebar while the sidebar is shown. The compose page sits
above the shell, so it wraps itself in LiquidNoChrome (see
Hide the chrome, or none at all). For
search, use a search destination (next section), not a page
pushed above the shell.
int _index = 0;
@override
Widget build(BuildContext context) {
return LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
tabBarTrailing: LiquidTabAction(
icon: const Icon(Icons.edit_outlined),
semanticLabel: 'Compose',
sfSymbol: 'square.and.pencil',
onPressed: () => Navigator.of(context).push(
MaterialPageRoute<void>(builder: _composePage),
),
),
body: DemoPage(title: kDemoDestinations[_index].label),
);
}
// Pushed above the shell (on the app's navigator): no chrome covers it.
Widget _composePage(BuildContext context) => const LiquidNoChrome(
child: Scaffold(
body: DemoPage(
title: 'New message',
children: [TextField(decoration: InputDecoration(hintText: 'Message'))],
),
),
);
[Compose circle beside the tab bar]
Search tab #
Search is a destination with role: LiquidDestinationRole.search, the last
one, plus LiquidShell.search. The app owns the LiquidSearchController, so
the query survives tab switches; results, recents and the
LiquidSearchScopeBar are the page's own content, padded with
LiquidShellScope.contentPaddingOf. A result pushes inside the tab's
navigator, under the glass back button of LiquidPage.
int _index = 0;
final _search = LiquidSearchController();
final _recents = ValueNotifier<List<String>>(const []);
final List<GlobalKey<NavigatorState>> _navigators = [
for (var i = 0; i < 3; i++) GlobalKey<NavigatorState>(),
];
static const _destinations = [
LiquidDestination(
icon: Icon(Icons.home_outlined),
selectedIcon: Icon(Icons.home),
label: 'Home',
sfSymbol: 'house',
),
LiquidDestination(
icon: Icon(Icons.library_music_outlined),
selectedIcon: Icon(Icons.library_music),
label: 'Library',
sfSymbol: 'books.vertical',
),
LiquidDestination(
icon: Icon(Icons.search),
label: 'Search',
role: LiquidDestinationRole.search,
),
];
@override
Widget build(BuildContext context) => LiquidShell(
destinations: _destinations,
selectedIndex: _index,
onDestinationSelected: (i) {
// Reselecting a tab pops it to its root.
if (i == _index) _navigators[i].currentState?.popUntil((r) => r.isFirst);
setState(() => _index = i);
},
search: LiquidSearch(
controller: _search,
placeholder: 'Songs, places',
// UIKit's scope bar while the search is active (native chrome, iOS
// 26+); LiquidSearchScopeBar on the search page elsewhere.
scopes: kSearchScopes,
onSubmitted: _remember,
),
body: IndexedStack(
index: _index,
children: [
_branch(0, _ListPage(title: 'Home', items: _home)),
_branch(1, _ListPage(title: 'Library', items: _library)),
_branch(
2,
_SearchPage(
controller: _search,
recents: _recents,
onRemember: _remember,
),
),
],
),
);
/// Each tab has its own navigator: a detail pushes inside the tab.
Widget _branch(int index, Widget root) => Navigator(
key: _navigators[index],
onGenerateRoute: (_) => MaterialPageRoute<void>(builder: (_) => root),
);
[Search tab selected: the tabs collapse to one circle beside the field, over a category grid] [Search active: the field above the keyboard, a scope bar and recent searches] [Search tab on a tablet: the field under the top bar]
The shell reports the phase in LiquidShellScope.of(context).searchPhase:
| Phase | iPhone, iOS 26 native | iPad, iOS 26 native | Glass (elsewhere) |
|---|---|---|---|
idle: another tab |
The tab pill, and the ⌕ as a separate circle | Search is a tab of the top bar, the sidebar or the bottom bar | The pill and a ⌕ circle; on a wide screen a cell of the top bar or a sidebar row |
selected: keyboard down |
The pill collapses to one circle (back to the previous tab) and the ⌕ becomes a field at the bottom | A small title, and the field on the row below it | Compact: the circle and the field morph in the bottom row. Wide: a field under the top bar |
active: the field has focus |
The field rides above the keyboard, with × | The field rises into the title row, with ⓧ | Compact: the field above the keyboard, with ×. Wide: the field moves into the top bar row |
| × | Clears the query and goes back to selected |
Clears the query and goes back to selected |
Clears the query and goes back to selected |
Selecting the tab never focuses the field; controller.activate() does.
The query is kept when the user switches tabs, and only × clears it.
Insets. chromeInsets covers the search field in every phase, the
raised field above the keyboard included. Pad the page with
LiquidShellScope.contentPaddingOf; never also add viewInsets (a
Scaffold with resizeToAvoidBottomInset would count the keyboard twice).
Vietnamese and other IMEs. On iOS 26 the native field owns the IME,
so Telex composes as in any iOS app. Read value.text freely (filter, fetch
results), but write controller.text only for an app action, such as a
recent search tapped or a reset, and never in reply to onChanged. A
write-back computed from the user's text (trimmed, lowercased) can be
stale by the time it lands and erases keystrokes in flight. Apple's Telex
never marks its text as composing, so composing will not warn you. More in
doc/search.md.
Pages and the back button #
Wrap each page of a tab's navigator in a LiquidPage(title:, child:). It
gives the page its title, a 44pt glass LiquidBackButton when the
navigator can pop, and up to three trailing actions.
With native chrome on iOS 26 every tab's pages get UIKit's navigation bar:
the title, the glass back circle and its history menu, the large title,
the scroll-edge effect, and the actions as bar buttons. LiquidPage then
draws only its child. Everywhere else (iOS before 26, Android,
nativeChrome: LiquidNativeChrome.off, a chromeBuilder) it draws a
Flutter glass bar laid out the same way. The page's first vertical scroll
view drives the large title and the scroll-edge effect; the tab bar's
minimize follows every vertical body scroll on screen that is not nested. A tab whose pages do not use LiquidPage has no bar and looks as
before.
Titles follow one model in both bars:
| Page | largeTitle |
Title |
|---|---|---|
| Pushed | any | Small and centred, beside the back button |
| Root | null (default) |
Large, on the bar row (as in Apple Music) in a compact window; no bar in a regular one, where the tab bar names the tab |
| Root | true |
A large-title row under the bar row, which collapses as the page scrolls |
| Root | false |
No bar |
A root page with actions and no bar of its own gets a bar row with a small title, so its actions have somewhere to go.
LiquidPageAction(sfSymbol:, icon:, label:, onPressed:) is one action:
sfSymbol for the native bar button, icon for the Flutter bar, label
for assistive technology and the tooltip. onPressed: null disables it.
Actions are listed in reading order. More than three is a debug assertion;
release builds show the first three. UIKit groups the buttons in one glass
capsule; the Flutter bar draws a 44pt glass circle per action. This is a
detail page of the example's Pages case (_Page puts a LiquidPage over
the wallpaper):
class _DetailPageState extends State<_DetailPage> {
bool _favourite = false;
int _shares = 0;
@override
Widget build(BuildContext context) {
final number = widget.number;
return _Page(
title: 'Detail $number',
actions: [
LiquidPageAction(
sfSymbol: 'square.and.arrow.up',
icon: const Icon(Icons.ios_share),
label: 'Share',
onPressed: () => setState(() => _shares++),
),
LiquidPageAction(
sfSymbol: _favourite ? 'heart.fill' : 'heart',
icon: Icon(_favourite ? Icons.favorite : Icons.favorite_border),
label: 'Favourite',
onPressed: () => setState(() => _favourite = !_favourite),
),
const LiquidPageAction(
sfSymbol: 'trash',
icon: Icon(Icons.delete_outline),
label: 'Delete',
onPressed: null,
),
],
children: [
_Row(
title: 'Detail ${number + 1}',
subtitle: 'One page deeper',
onTap: () => _push(context, _DetailPage(number: number + 1)),
),
_Row(
title: 'Shared $_shares ${_shares == 1 ? 'time' : 'times'}',
subtitle: _favourite ? 'A favourite' : 'Not a favourite',
),
for (var i = 1; i <= 30; i++) _Row(title: 'Detail $number item $i'),
],
);
}
}
[A root page: the large title on the bar row and an Add action] [A pushed page: the glass back button, a centred title and three actions, the last one disabled] [A root page with a large-title row that collapses as the page scrolls]
| iPhone, native | iPad, native |
|---|---|
| [UIKit's navigation bar on a pushed page of an iPhone: the glass back circle, the title and the actions in one glass group] | [UIKit's navigation bar on a pushed page of an iPad, under the top tab bar] |
LiquidHideChrome over a LiquidPage hides the tab bar and the sidebar
and keeps the page's bar, in both chromes; a tiled sidebar comes back when
the page goes. For a page that fills the screen, leave LiquidPage out of
it. Pages pushed above the shell, and the pages of a shell nested in
another shell's body, draw the Flutter bar.
Every back respects the page's PopScope. The button, the native back
circle and its long-press history menu (each page in turn, top first) call
Navigator.maybePop, and Flutter's back swipe is off while a page refuses.
A refused pop leaves the page and the bar where they were. The iOS edge
swipe is Flutter's on every tab: the page follows the finger, and the
native bar switches when the gesture ends. System back and
the iOS edge swipe pop the selected tab's top page first, also when the
shell is itself a pushed page; only a tab at its root lets them pop the
shell's route (doc/router_integration.md). LiquidBackButton also
works on its own, with onPressed to replace maybePop.
Segmented control #
LiquidSegmentedControl is modelled on iOS 26's UISegmentedControl, close
to it but not identical: a flat 32pt track centred in a 44pt touch box, a
white thumb, and a liquid lens that lifts under the finger, follows a drag
across segments, lands with a wobble and plays a selection click per
segment crossed. It is controlled (rebuild it
with the index onChanged gives), text-only, and each LiquidSegment can
be enabled: false. expand: true (default) fills the width; false
sizes to the labels. Colours and the label style are segmentTrack,
segmentThumb and segmentLabelStyle of LiquidGlassTheme. The search
scopes use it. Every segment keeps a 44pt tap target in height; below 44pt
of width per segment the target is as wide as the segment. Details, the
accessibility rules and what differs from iOS (a 3-segment "A | B | C" is
132pt against native's 96, the wobble matches native's peaks and settle
time, not every frame) are in
doc/segmented_control.md.
int _scope = 0;
Widget _scopes() => LiquidSegmentedControl(
segments: const [
LiquidSegment(label: 'All'),
LiquidSegment(label: 'Songs'),
LiquidSegment(label: 'Places'),
],
selectedIndex: _scope,
// Controlled: rebuild with the index the user chose.
onChanged: (i) => setState(() => _scope = i),
);
[Segmented controls of two, three and five segments over coloured stripes] [The same controls in dark mode]
The search tab's LiquidSearch.scopes takes the titles: on iOS 26+ with
native chrome the scope bar is UIKit's own (shown while the search is
active), and elsewhere LiquidSearchScopeBar draws this control. See
doc/search.md.
"Discard changes?" guard #
beforeDestinationChange runs before every user selection, reselect
included. Return false (or throw) to stay. Taps while it is pending are
ignored.
int _index = 0;
bool _dirty = true;
Future<bool> _confirmLeave(int index) async {
if (!_dirty || index == _index) return true;
final discard = await showLiquidAlert<bool>(
context,
title: 'Discard changes?',
actions: const [
LiquidAlertAction(
label: 'Keep editing',
value: false,
style: LiquidAlertActionStyle.cancel,
),
LiquidAlertAction(
label: 'Discard',
value: true,
style: LiquidAlertActionStyle.destructive,
),
],
);
return discard ?? false;
}
@override
Widget build(BuildContext context) => LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
beforeDestinationChange: _confirmLeave,
onDestinationSelected: (i) => setState(() {
if (i != _index) _dirty = false;
_index = i;
}),
body: DemoPage(
title: kDemoDestinations[_index].label,
children: [
SwitchListTile(
title: const Text('Unsaved changes'),
value: _dirty,
onChanged: (value) => setState(() => _dirty = value),
),
],
),
);
[Discard changes dialog]
Alerts and action sheets #
showLiquidAlert and showLiquidActionSheet complete with the value of the
action the user picked. On iOS 26 and later they are the system's own
UIAlertController, with Liquid Glass, above the native tab bar and
sidebar. On Android and on iOS before 26 they are drawn by Flutter, with the
same glass as the shell (LiquidGlass). Pass
presentation: LiquidDialogPresentation.flutter to draw Flutter everywhere,
or .system for UIKit's alert on every iOS.
// True for "Discard"; false for "Keep editing" or a dismissal.
Future<bool?> _confirmDiscard({
LiquidDialogPresentation presentation = LiquidDialogPresentation.auto,
}) => showLiquidAlert<bool>(
context,
title: 'Discard changes?',
message: 'Your edits will be lost.',
actions: const [
LiquidAlertAction(
label: 'Keep editing',
value: false,
style: LiquidAlertActionStyle.cancel,
),
LiquidAlertAction(
label: 'Discard',
value: true,
style: LiquidAlertActionStyle.destructive,
),
],
presentation: presentation,
);
// Pass the tapped button's context: on iPad the sheet points at it.
Future<String?> _photoAction(
BuildContext button, {
LiquidDialogPresentation presentation = LiquidDialogPresentation.auto,
}) => showLiquidActionSheet<String>(
button,
title: 'Photo',
actions: const [
LiquidAlertAction(
label: 'Delete photo',
value: 'delete',
style: LiquidAlertActionStyle.destructive,
),
LiquidAlertAction(label: 'Share', value: 'share'),
LiquidAlertAction(
label: 'Cancel',
value: 'cancel',
style: LiquidAlertActionStyle.cancel,
),
],
presentation: presentation,
);
| iOS 26+ | iOS 15–25 | Android | |
|---|---|---|---|
auto (default) |
UIAlertController (glass) |
Flutter glass | Flutter glass |
system |
UIAlertController (glass) |
UIAlertController |
Flutter glass |
flutter |
Flutter glass | Flutter glass | Flutter glass |
- A tap outside an action sheet, Escape or Android back completes with the cancel action's value, or null without one.
- At most one
canceland onepreferredaction. A blank label, no actions, a disabled preferred action or no enabled action throwsArgumentError. - Every visible string is yours. The Flutter sheet's barrier uses
LiquidShellStrings.dismissfor screen readers.
Details: doc/native_dialogs.md.
Hide the chrome, or none at all #
A full-frame page pushed inside a branch hides every piece of chrome
while it is mounted and on screen. A branch kept alive off screen (an
IndexedStack, go_router's StatefulShellRoute.indexedStack) or a route
covered by another one does not hide it, so switching tabs in code brings
the chrome back. The branch needs its own Navigator under the shell,
as a router's shell branch has: LiquidHideChrome finds the shell above it,
and a page on the app's navigator is not under the shell.
static const _rootKey = ValueKey<String>('root');
static const _detailKey = ValueKey<String>('detail');
final _branchKey = GlobalKey<NavigatorState>();
int _index = 0;
bool _detailOpen = false;
@override
Widget build(BuildContext context) => LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() {
_index = i;
_detailOpen = false;
}),
body: _branch(),
);
// The branch has its own navigator, as a router's shell branch does. The
// detail page is pushed inside it, under the shell, which is where
// LiquidHideChrome reaches the shell. Back and the iOS edge swipe pop it
// first: the shell sees the branch's navigator.
Widget _branch() => Navigator(
key: _branchKey,
pages: [
MaterialPage<void>(
key: _rootKey,
child: DemoPage(
title: kDemoDestinations[_index].label,
children: [
ListTile(
title: const Text('Open a full-frame detail page'),
trailing: const Icon(Icons.chevron_right),
onTap: () => setState(() => _detailOpen = true),
),
],
),
),
if (_detailOpen)
const MaterialPage<void>(
key: _detailKey,
// Full frame: every piece of chrome hides while it is mounted.
child: LiquidHideChrome(
child: Scaffold(body: DemoPage(title: 'Detail')),
),
),
],
onDidRemovePage: (page) {
if (page.key == _detailKey) setState(() => _detailOpen = false);
},
);
[A full-frame detail page without chrome]
A page pushed above the shell (on the app's navigator) is not covered by
the chrome. LiquidNoChrome tells its content so, and
LiquidShellScope.contentPaddingOf then pads only for the system insets.
This is the compose page of the trailing-action snippet:
// Pushed above the shell (on the app's navigator): no chrome covers it.
Widget _composePage(BuildContext context) => const LiquidNoChrome(
child: Scaffold(
body: DemoPage(
title: 'New message',
children: [TextField(decoration: InputDecoration(hintText: 'Message'))],
),
),
);
[The compose page, above the shell, without chrome]
Custom chrome #
chromeBuilder receives the chrome the shell would draw. Wrap it, or ignore
it and draw your own; the shell still places and measures the slot, so
chromeInsets follow your bar, and a bar that collapses to 0pt adds no
inset. LiquidTabBar and LiquidSidebar are public for building your own
(see Standalone tab bar and sidebar).
The builder's result sits in a transparent Material, like the default
chrome, so plain Text gets the theme's bodyMedium style and an InkWell
has somewhere to splash, with no Scaffold above the shell.
int _index = 0;
@override
Widget build(BuildContext context) => LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
chromeBuilder: _chrome,
body: DemoPage(title: kDemoDestinations[_index].label),
);
Widget _chrome(
BuildContext context,
LiquidChromeDetails details,
Widget defaultChrome,
) {
if (details.slot == LiquidChromeSlot.tabBar) {
// Wrap: a caption above the default bar.
final scheme = Theme.of(context).colorScheme;
return Column(
mainAxisSize: MainAxisSize.min,
children: [
DecoratedBox(
decoration: ShapeDecoration(
color: scheme.tertiaryContainer,
shape: const StadiumBorder(),
),
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
child: Text('Beta'),
),
),
const SizedBox(height: 8),
defaultChrome,
],
);
}
// Replace: a plain list instead of the glass sidebar.
return Material(
child: ListView(
// Like LiquidSidebar: leave the route's scroll controller (status-bar
// tap to top) to the body list.
primary: false,
children: [
for (final i in details.visibleIndices)
ListTile(
leading: details.destinations[i].icon,
title: Text(details.destinations[i].label),
selected: i == details.selectedIndex,
onTap: () => details.select(i),
),
],
),
);
}
[Default tab bar with a Beta caption]
A replacement sidebar list sets primary: false, as LiquidSidebar does,
so a status-bar tap still scrolls the body. A LiquidTabBar you build
yourself decides narrow from the window's width; in a shell narrower than
the window, pass narrow explicitly (see Narrow width).
Chrome you draw yourself owns its own accessibility: semantics (labels, selected state, a modal barrier for an overlay sidebar), hit targets of at least 44pt, and large-text behaviour such as a large content viewer. The guarantees in Accessibility and fallbacks cover only the default chrome, or the parts of it you keep.
Standalone tab bar and sidebar #
LiquidTabBar and LiquidSidebar work without a LiquidShell, in your own
layout. You then own what the shell would do: the bar's outer margins and
its safe area, the switch between bar and sidebar, the content insets, and
system back. Both need a Directionality and an Overlay above them (for
tooltips and the large-text label viewer): a route of a MaterialApp has
both, MaterialApp.builder has no Overlay. LiquidTabBar picks its
narrow padding from the window width; in a pane narrower than the window,
pass narrow yourself.
int _index = 0;
// Both widgets need a Directionality and an Overlay above them (tooltips,
// the large-text label viewer). A route of a MaterialApp has both;
// MaterialApp.builder, above the Navigator, has no Overlay.
@override
Widget build(BuildContext context) {
final page = DemoPage(title: kDemoDestinations[_index].label);
void select(int index) => setState(() => _index = index);
if (MediaQuery.sizeOf(context).width >= 700) {
return Scaffold(
body: Row(
children: [
LiquidSidebar(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: select,
header: Text(
'Acme Notes',
style: Theme.of(context).textTheme.titleLarge,
),
),
Expanded(child: page),
],
),
);
}
return Scaffold(
// The page scrolls under the floating bar; Scaffold pads it clear.
extendBody: true,
body: page,
bottomNavigationBar: SafeArea(
top: false,
// The bar draws the row only: the margins are yours.
minimum: const EdgeInsets.fromLTRB(16, 0, 16, 16),
child: Center(
heightFactor: 1,
child: LiquidTabBar(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: select,
),
),
),
);
}
Phone: LiquidTabBar |
Wide window: LiquidSidebar |
|---|---|
| [A standalone glass tab bar in a Scaffold] | [A standalone glass sidebar beside the page] |
Custom theme #
int _index = 0;
Brightness _brightness = Brightness.light;
@override
Widget build(BuildContext context) {
final scheme = ColorScheme.fromSeed(
seedColor: const Color(0xFF00897B),
brightness: _brightness,
);
final glass = LiquidGlassTheme.fromColorScheme(scheme).copyWith(
// Liquid: the default tier on Impeller (iOS, Android 10+, macOS).
liquidTint: scheme.primaryContainer.withValues(alpha: 0.5),
liquidBlurSigma: 3,
// Frosted: no Impeller, battery saver, Low Power Mode, slow frames.
tint: scheme.primaryContainer.withValues(alpha: 0.6),
blurSigma: 18,
labelStyle: const TextStyle(
fontSize: 11,
height: 1.3,
fontWeight: FontWeight.w700,
),
);
final theme = ThemeData(colorScheme: scheme, extensions: [glass]);
return Theme(
data: theme,
child: LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
// The glass below is Flutter's: keep it on iOS 26 too.
nativeChrome: LiquidNativeChrome.off,
body: DemoPage(
title: 'Brand glass',
children: [
SwitchListTile(
title: const Text('Dark'),
value: _brightness == Brightness.dark,
onChanged: (dark) => setState(
() => _brightness = dark ? Brightness.dark : Brightness.light,
),
),
],
),
),
);
}
| Liquid (Impeller: the default tier) | Frosted |
|---|---|
| [Brand-tinted liquid glass] | [Brand-tinted frosted glass] |
Each tier reads its own fields: liquidTint and liquidBlurSigma style
the liquid tier, tint and blurSigma only frosted. Set both pairs for a
brand theme. See doc/theming.md for every field and its
default.
Liquid glass #
iOS 26 native (left) and Flutter liquid (right):
[iOS 26 native (left) and Flutter liquid (right), iPhone] [iOS 26 native (left) and Flutter liquid (right), iPad]iOS 26 native iPhone (left) and Flutter liquid on Android (right):
[iOS 26 native (left) and Flutter liquid on Android (right)]What the lens draws, its theme fields, when it falls back and what it costs: doc/liquid.md.
The Flutter tab bar #
Where the system does not draw the chrome (Android, iOS 15–25, a forced tier), the tab bar is Flutter's, measured against iOS 26.5:
- 86pt slots in a 62pt pill, 21pt from the screen edges, the pill at the start beside the trailing circle or the ⌕;
- a selected tab that rests in a soft capsule and turns into a liquid lens on touch: it follows a drag, tints and magnifies the icons under it, and snaps to a tab when the finger lifts;
- selection on release, as on iOS, and a selection click as the lens crosses into another tab;
- a 44pt bar on landscape phones and a 48pt label-only bar on top on iPad;
- a 48pt circle while minimized on scroll, which a tap expands;
- a scroll-edge pocket under the bar on the liquid tier.
Reduce Motion cross-fades the selection instead. The geometry, the lens, the icons and what is not identical to iOS: doc/tab_bar.md.
Forced tier #
int _index = 0;
LiquidGlassTier _tier = LiquidGlassTier.frosted;
@override
Widget build(BuildContext context) {
return LiquidGlassScope(
policy: LiquidGlassPolicy(forcedTier: _tier),
child: LiquidShell(
destinations: kDemoDestinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
// The glass below is Flutter's: keep it on iOS 26 too.
nativeChrome: LiquidNativeChrome.off,
body: DemoPage(
title: 'Forced tier',
children: [
SegmentedButton<LiquidGlassTier>(
segments: [
for (final tier in LiquidGlassTier.values)
ButtonSegment(value: tier, label: Text(tier.name)),
],
selected: {_tier},
onSelectionChanged: (s) => setState(() => _tier = s.single),
),
if (_tier == LiquidGlassTier.liquid)
const Text(
'Liquid needs Impeller; without it this draws frosted.',
),
],
),
),
);
}
| Liquid | Frosted | Solid |
|---|---|---|
| [Liquid tier] | [Frosted tier] | [Solid tier] |
Forcing liquid without Impeller (Android 9 and lower, the web) draws
frosted. See doc/tiers.md.
Form factors #
The example's form-factor screen puts a basic shell in fixed device frames with this helper:
/// [child] laid out as on a device of logical [size] with safe-area
/// [padding], then scaled to the width it is given.
Widget _inFrame(
BuildContext context,
Size size,
EdgeInsets padding,
Widget child,
) => AspectRatio(
aspectRatio: size.aspectRatio,
child: FittedBox(
child: SizedBox.fromSize(
size: size,
child: MediaQuery(
data: MediaQuery.of(context).copyWith(
size: size,
padding: padding,
viewPadding: padding,
),
child: child,
),
),
),
);
| iPhone | Android | iPad portrait | iPad portrait, sidebar open | iPad landscape |
|---|---|---|---|---|
| [iPhone] | [Android] | [iPad portrait] | [iPad portrait with the sidebar open] | [iPad landscape] |
Narrow width #
Below kLiquidNarrowWidth (340pt of the shell's own width) the bottom row
margin drops from 21 to 8. Five tabs plus a trailing action at 320pt then
get 43.6pt slots with tap areas of at least 44pt at text scale 1, the
minimum hit target. A label that still does not fit
takes its cell's side padding, then shrinks, never below 10pt, and only
then ends in an ellipsis.
int _index = 0;
@override
Widget build(BuildContext context) {
const destinations = [
LiquidDestination(
icon: Icon(Icons.home_outlined),
selectedIcon: Icon(Icons.home),
label: 'Home',
),
LiquidDestination(
icon: Icon(Icons.map_outlined),
selectedIcon: Icon(Icons.map),
label: 'Explore',
),
LiquidDestination(
icon: Icon(Icons.inbox_outlined),
selectedIcon: Icon(Icons.inbox),
label: 'Inbox',
),
LiquidDestination(
icon: Icon(Icons.bookmark_outline),
selectedIcon: Icon(Icons.bookmark),
label: 'Saved',
),
LiquidDestination(
icon: Icon(Icons.settings_outlined),
selectedIcon: Icon(Icons.settings),
label: 'Settings',
),
];
return ColoredBox(
color: Theme.of(context).colorScheme.surfaceContainerLowest,
child: Center(
// The 320pt shell stands for a narrow window, which clips what it
// draws.
child: ClipRect(
child: SizedBox(
width: 320, // below kLiquidNarrowWidth (340)
child: LiquidShell(
destinations: destinations,
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
// Native chrome spans the window, not this 320pt shell.
nativeChrome: LiquidNativeChrome.off,
tabBarTrailing: LiquidTabAction(
icon: const Icon(Icons.edit_outlined),
semanticLabel: 'Compose',
onPressed: () => Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (_) => const LiquidNoChrome(
child: Scaffold(
body: DemoPage(
title: 'New message',
children: [
TextField(
decoration: InputDecoration(hintText: 'Message'),
),
],
),
),
),
),
),
),
body: DemoPage(
title: destinations[_index].label,
children: const [
Text(
'This shell is 320pt wide, below kLiquidNarrowWidth '
'(340): row margin 8, tap areas of at least 44pt.',
),
SizedBox(height: 12),
],
),
),
),
),
),
);
}
[Five tabs and a compose circle in a 320pt shell]
Trade-off: between text scale 1 and 1.6 a narrow bar's labels can shrink below the size the user chose, down to 10pt. The icon-only cells and the large content viewer only start at 1.6. Larger text also grows the pill and the trailing circle, so cells can drop under 44pt there.
Native iOS chrome #
On an iPhone or iPad with iOS 26 or later, the shell can hand its chrome to
the system: a real UITabBarController in sidebar mode, with the Liquid
Glass tab bar. At regular width that is the top bar, the sidebar toggle,
the sidebar (over the content in portrait, beside it in landscape) and a
native footer; at compact width (every iPhone, in either orientation, and
a narrow iPad window) it is UIKit's floating tab bar at the bottom, with
the trailing action as a separate round button. Your Flutter body stays exactly
where it is. Everywhere else (Android, iOS before 26) the same
LiquidShell draws its Flutter chrome.
Opt in once, in ios/Runner/Info.plist:
<key>LiquidShellNativeChrome</key>
<true/>
Then give every destination, and the trailing action, an SF Symbol. A shell
without a symbol somewhere, or with a chromeBuilder, keeps its Flutter
chrome; so does nativeChrome: LiquidNativeChrome.off. In debug, a shell
that only lacks symbols logs one line, once per shell, naming them.
int _index = 0;
int _drafts = 0;
static const _destinations = [
LiquidDestination(
icon: Icon(Icons.home_outlined),
selectedIcon: Icon(Icons.home),
label: 'Home',
sfSymbol: 'house',
),
LiquidDestination(
icon: Icon(Icons.inbox_outlined),
selectedIcon: Icon(Icons.inbox),
label: 'Inbox',
badge: LiquidBadge.count(3),
sfSymbol: 'tray',
),
LiquidDestination(
icon: Icon(Icons.bar_chart),
selectedIcon: Icon(Icons.bar_chart),
label: 'Reports',
placement: LiquidPlacement.sidebarOnly,
sfSymbol: 'chart.bar',
),
LiquidDestination(
icon: Icon(Icons.settings_outlined),
selectedIcon: Icon(Icons.settings),
label: 'Settings',
sfSymbol: 'gear',
),
];
@override
Widget build(BuildContext context) {
return LiquidShell(
destinations: _destinations,
selectedIndex: _index,
beforeDestinationChange: _confirmLeave, // "Discard changes?"
onDestinationSelected: (i) => setState(() {
if (i != _index) _dirty = false;
_index = i;
}),
tabBarTrailing: LiquidTabAction(
icon: const Icon(Icons.edit_outlined),
semanticLabel: 'Compose',
sfSymbol: 'square.and.pencil',
onPressed: () => setState(() => _drafts++),
),
nativeSidebarFooter: LiquidNativeSidebarFooter(
title: 'Ann Lee',
subtitle: 'Active profile',
sfSymbol: 'person.crop.circle',
semanticLabel: 'Ann Lee, active profile',
onPressed: () => setState(() => _index = 3),
),
body: DemoPage(
title: _destinations[_index].label,
children: [
Text('Drafts: $_drafts'),
SwitchListTile(
title: const Text('Unsaved changes'),
value: _dirty,
onChanged: (value) => setState(() => _dirty = value),
),
],
),
);
}
How it behaves:
- Taps on native tabs and sidebar rows go through
beforeDestinationChangelike Flutter taps; the native selection changes only when the guard accepts. The trailing action and the footer call your callbacks. - A page pushed above the shell hides the native chrome while it covers the
shell; a Flutter dialog above the shell makes it ignore touches, and
hides the compact bar. A native alert (
showLiquidAlert) is drawn above it and changes nothing. LiquidHideChromehides it, as it hides the Flutter chrome.LiquidShellScope.of(context).nativeChrometells pages which chrome is on screen.sidebarHeaderandsidebarFooterare Flutter widgets and show only in the Flutter sidebar; usenativeSidebarFooterfor the native one.- The native chrome cannot be drawn by widget tests or goldens. The images
in this section come from the simulator (
make integration-ios-native).
| iPhone | iPad portrait | Sidebar open |
|---|---|---|
| [Native floating tab bar at the bottom of an iPhone, with a separate search button] | [Native tab bar, iPad portrait] | [Native sidebar over the content] |
Simulator captures (make integration-ios-native), not goldens.
Window controls #
A windowed iPadOS 26 app has its close, minimise and resize buttons in the
top-leading corner. The shell's own top row and the Flutter sidebar header
move past them, and LiquidShellScope.of(context).windowControls gives the
size of the cluster to your pages. Wrap a page's top row, for example a large
title, in LiquidWindowControlsClearance:
LiquidWindowControlsClearance(
child: Text('Inbox', style: Theme.of(context).textTheme.headlineMedium),
)
Everywhere else the value is zero and nothing moves.
Layout rules #
Widths are the shell's own constraints, so Split View, freeform windows and tests behave correctly.
| Layout | When | Sidebar | Tab bar |
|---|---|---|---|
| Compact | width < 700, or landscape and lower than compactHeight (500) |
never | bottom pill (narrow margins below 340; a 44pt bar with labels beside the icons in landscape) |
| Regular, overlay | width ≥ 700 and not compact, portrait or narrower than 1024 | hidden by default; covers the content when shown | top pill + toggle |
| Regular, tiled | width ≥ 1024 and landscape | shown by default, beside the content | none while shown; top pill + toggle when hidden |
| Hidden | a LiquidHideChrome is mounted and on screen |
none | none |
Change the thresholds with LiquidShellBreakpoints; compactHeight: 0
gives landscape phones the regular layout again. Read the current
layout, insets and sidebar state with LiquidShellScope.of(context).
Accessibility and fallbacks #
Glass is liquid unless one of these is on. A signal that cannot be read counts as off, so the shell never fails to draw.
| Signal | iOS | Android | Glass |
|---|---|---|---|
| Reduce transparency | Reduce Transparency | Animator duration scale 0, or high contrast (API 34+ contrast, or high-text-contrast) | solid |
| High contrast | Increase Contrast | (reported through reduce transparency) | solid |
| Window blurs disabled | not used | isCrossWindowBlurEnabled false (API 31+), without battery saver |
solid |
| Power saving | Low Power Mode | Battery Saver | frosted |
| Low-end device | not used | isLowRamDevice, or less than 3 GiB of memory |
frosted |
| GLES only | not used | Android 10+ without Vulkan 1.1 | frosted |
| Slow frames | raster p90 over 1.25 × the frame budget for three 60-frame windows (profile and release) | same | frosted |
| No Impeller | never | Skia, API 28 and lower | frosted |
Cells and rows are buttons with labels, badge text and selected state. From 1.6× text size the bar is icon-only and a long press shows the label large. With Reduce Motion the tab lens cross-fades instead of sliding, and the bar neither swells nor glows. The overlay sidebar is modal for screen readers, and while it is open, system back closes it before anything else.
These guarantees cover the chrome the shell draws. A chromeBuilder that
replaces a slot must provide its own semantics, hit targets and large
content viewer (see Custom chrome).
Limitations #
- At most 5 tab-bar destinations. More than 5
everywheredestinations trip a debug assert; release builds draw them in narrower cells. Put the rest in the sidebar withLiquidPlacement.sidebarOnly. - Narrow labels shrink before large text takes over. In a narrow bar, between text scale 1 and 1.6 a label that does not fit is drawn smaller than the size the user chose, down to 10pt. Icon-only cells and the large content viewer start at 1.6 (see Narrow width).
- Back with the overlay sidebar open, or a tab that can pop. System
back closes the overlay sidebar first, then pops the selected tab's
page, but the route still calls your own
PopScopehandlers on the shell's route withdidPop: false. A handler that shows a dialog should return early whilechromeKindisLiquidChromeKind.sidebarOverlayor your branch navigator can pop (see doc/router_integration.md). How a router such as go_router orders back is not covered yet. - Native chrome is opt-in. It needs iOS 26,
LiquidShellNativeChromein Info.plist, and an SF Symbol on every destination. Strings the system draws (the sidebar button's VoiceOver label) follow the device language, not your app's. The compact native bar minimizes on scroll, with limits of its own (see doc/native_chrome.md), and it hides while a Flutter dialog or sheet is up (the body keeps its inset); a native alert leaves it in place. - A frame or two without chrome at start on iOS. Whether the app opted
in, and the iOS version, are known only natively, so on iOS a shell that
could use native chrome draws none until the platform answers, even in
an app without the Info.plist key. The same holds for an iPad app running
on a Mac ("Designed for iPad"), which then draws Flutter chrome
(
iPadAppOnMac). Every other platform draws its chrome from the first frame. - Native chrome hit testing follows UIKit's view tree. Touches on the
transparent part of the native chrome go to Flutter; a future iOS that
reshapes
UITabBarController's views can break that.make ios-unithit-tests UIKit's real tab bar and sidebar on a simulator (calls tohitTest, not real touch events); check real taps and scrolling by hand on each new iOS release. - One native chrome per window. The newest
LiquidShellowns it. A shell nested in another shell's body (sub-tabs) takes it from the outer one, which then shows no navigation; give a nested shellnativeChrome: LiquidNativeChrome.off. - The native back swipe does not follow the finger yet. Flutter's back gesture moves the page, and the native bar switches when it ends.
- Pages pushed above the shell keep the Flutter bar, and so do the pages of a shell nested in another shell's body.
- Page actions are icons. At most three per page; no avatar images or menus yet. UIKit groups them in one glass capsule, the Flutter bar draws one circle each.
- A native action tap is matched by tab and depth. If the app replaces the top page with another page at the same depth (a pop and a push in one go) while a tap is on its way, the tap runs the new page's action at the same position when that action has the same SF Symbol and is enabled.
- Liquid glass inside another BackdropFilter draws frosted. Flutter 3.44 gives a nested filter coordinates relative to its parent's region, so the lens cannot be placed there.
- Liquid glass is opaque. It writes opaque pixels: over a transparent
window (add-to-app with a transparent
FlutterView, AndroidTransparencyMode.transparent, an overlay window) or in an image capture of a subtree (RepaintBoundary.toImage, share-as-image) it is a solid grey or tinted slab, not see-through glass. AnOpacityor fade ancestor fades it normally. Force frosted there withLiquidGlassScope(policy: LiquidGlassPolicy(forcedTier: LiquidGlassTier.frosted)). - The lens assumes an upright, unscaled glass. Under a scaling or
rotating ancestor (zoom page transitions, scale-in dialogs,
CupertinoContextMenu) the lens is placed on the glass's axis-aligned bounding box, with the corner radii, bezel and rim at their unscaled size, so its corners do not match the clip; force frosted inside such a transform if it stays on screen. - One frame of lens lag in some moves. A transition of the nearest
route or a scroll of the nearest
Scrollablemoves the lens in the same frame. Glass under aCompositedTransformFollower, or moved by an outerNavigator's route or an outerScrollable, is placed one frame late. - Native alerts. A hot restart with a system alert up leaves an
orphan alert in debug builds; a tap closes it. After a system alert,
VoiceOver focus goes back to the Flutter view, not to the node that was
tapped. Alerts have no text fields yet. The system alert's text
follows the device's Dynamic Type, not your
TextScaler, and system dialog text follows the device language for any string UIKit adds (none in alerts; VoiceOver hints). Unverified on a real iOS < 26 runtime: the iOS 15–25 paths are checked by XCTest with the OS version injected. See doc/native_dialogs.md. - Android signals are best effort. Each one that cannot be read counts as off.
- The Flutter tab bar is close to iOS 26, not identical. Its glass is
matched by measurement and does not re-tint by the brightness behind
it; corners are circular, not continuous; icons are your icon font, not
SF Symbols; colours are solid, not vibrant; the lens's squash and
stretch matches the peaks and timing but not every frame; the pocket is
three blur bands. In dark mode the touched lens's grey veil does not
take the page's hue, as iOS's does. Glass cannot see a platform view (map, web
view): force
frostedorsolidon such pages. A narrow iPad window uses the iPhone measurements, and there is no iPad tab customization on long press. Details in doc/tab_bar.md. - The segmented control is close to iOS 26, not identical. The track is flat (as iOS 26.5's), the box is 44pt (native's 32pt) with segments at least 44pt wide (a 3-segment "A | B | C" is 132pt, native's 96pt), labels follow the system text size up to x2, below 44pt of width per segment the hit target is as wide as the segment, and the landing wobble matches native's peaks and settle time, not every frame. Details in doc/segmented_control.md.
Known issues #
- The first status-bar tap may not scroll to the top while the iOS accessibility bridge is on (VoiceOver, Switch Control, Speak Screen; always in the simulator): Flutter's accessibility scroll view takes the tap. Tap again. Upstream: flutter/flutter#191565.
- A tab revealed a few frames after it is selected (a custom
navigatorContainerBuilderthat animates the switch): system back may not find that tab's navigator. - iPhone in landscape with the keyboard up and native chrome: the bottom inset is 0, so the search field covers the first result.
More #
- doc/theming.md:
LiquidGlassThemefields and defaults - doc/segmented_control.md: the segmented control, its API, motion, accessibility and what differs from iOS
- doc/tiers.md: tiers, the policy, signals, writing a renderer
- doc/tab_bar.md: the Flutter tab bar, its geometry, lens, icons, accessibility and what is not identical to iOS
- doc/liquid.md: the liquid lens, the tab lens and the pocket, its theme fields, fallbacks and cost
- doc/native_chrome.md: native iOS chrome, its install rules, behaviour and limits
- doc/search.md: the search tab, its phases, the controller rules, IMEs and insets
- doc/native_dialogs.md: native alerts and action sheets, who draws them, how the answer is decided, troubleshooting
- doc/router_integration.md:
IndexedStack,Navigatorand go_router wiring, branch state, hide/no chrome, system back, known limits
Roadmap #
0.1.0 is the first release on pub.dev: the adaptive shell, the liquid,
frosted and solid tiers, opt-in native iOS 26 chrome with UIKit's
navigation bar and page actions on every tab, native alerts and action
sheets, the search tab with scopes, and LiquidSegmentedControl.
Planned:
- A native back swipe that follows the finger.
- Avatar images and menus as page actions.
- Share sheet, haptics, date picker and text fields in native alerts.
- A go_router adapter (a
StatefulShellRoutebuilder, route-driven hide chrome). Until then, see doc/router_integration.md.
License #
MIT. See LICENSE.