Liquid Glass Widgets
Bring Apple's iOS 27 & iOS 26 Liquid Glass design system to Flutter — with CoreAnimation-calibrated shader refraction, two-layer lifted lenses, physics-driven liquid morphing, and zero third-party dependencies.
Quick Start · iOS 27 Parity · Widget Catalog · Performance · AI Skill · Docs
Captured on iOS 27.0 Simulator (Impeller Metal, GlassStyle.ios27) · Left: lifted control lenses · Center: Apple Mail liquid morphs & pinned chrome · Right: Apple Music refraction & scroll-to-minimize.
Why liquid_glass_widgets?
- iOS 27 & iOS 26 Calibrated Optics (
GlassStyle.ios27/ios26) — Custom GLSL fragment shaders implementing paraxial lens refraction (GlassLensModel.paraxial), CoreAnimation luma-range face optics, directionalLighten/Darkenfrost blending, chromatic rim dispersion, two-layer lifted lenses (IndicatorLensOptics) onGlassTabBarandGlassSegmentedControl, and lifted crystal paraxial lenses onGlassSwitchandGlassSlider. - 120 Hz Performance Budget — Scoped 2-read backdrop hoisting (
GlassBackdropGroup.hoisted, wired automatically inGlassScaffold) collapsesNfloating bars fromN + 1Impeller framebuffer copies down to 2 (measured -31.3% dark raster time and -21.0% CPU on iPhone 16 Pro at 120 Hz), while resting switches, sliders, and segmented controls hold 0 active shader layers. - 60+ First-Party Cupertino Widgets — Complete navigation, form, list, picker, menu, sheet, and dialog system including
GlassScaffold,GlassTabBar(.bottom,.inline,.searchable,.minimizable),GlassAppBar.pinned,GlassModalSheet,GlassMenu,GlassDatePicker, andGlassSurfaceStyle.solidfor zero-shader scrolling cards. - Physics-Driven Liquid Morph Engine — Spring-based teardrop and droplet morphs for
GlassMenu,GlassPullDownButton,GlassPopover,showGlassConfirmationDialog(morphFrom:), andGlassModalSheet.show(morphFrom:), plus order-independentO(N)normal-weighted SDF metaball blending (LiquidGlassBlendGroup). - Every Platform, Zero Runtime Dependencies — Pure Flutter SDK (
flutter: sdk: flutter). Runs full multi-pass Impeller refraction on iOS, Android, and macOS, with single-pass lightweight shaders (GlassQuality.standard) and shader-free frosted fallbacks (GlassQuality.minimal) on Skia, Web (CanvasKit/Wasm), Windows, and Linux. - Native Accessibility, Keyboard & RTL — Honours Reduce Motion, Increase Contrast, and iOS On/Off switch labels (
I/O), provides 44 pt minimum semantic/touch targets, VoiceOver/TalkBack heading & switch/radio roles, full keyboard Tab/Space/Enter/Arrow navigation, and RTL layouts.
Native iOS 27 Comparison
Controls and floating chrome are calibrated directly against live iOS 27.0 (UIKit / SwiftUI) across both rendering tiers:
GlassQuality.premium(Impeller — default for chrome, overlays & active lenses): Multi-pass 3D paraxial refraction, two-layer lifted content magnification (lens_content_warp.frag), chromatic bevel dispersion, and CoreAnimation luma-range frost.GlassSwitch,GlassSlider, andGlassSegmentedControlmount their lens shader only while pressed or dragged.GlassQuality.standard(Lightweight shader — Skia, Web & dense surfaces): Single-pass fragment shader with meniscus rim absorption, directionalrimLight, and hairline contours. Indicator lenses skip backdrop blur to keep frame times flat on Skia and Web, and refract an optional wallpaper source viaLiquidGlassScope.
Light Mode — Lifted Lenses (Native iOS 27.0 vs. Flutter Premium vs. Flutter Standard)
Dark Mode — Lifted Lenses (Native iOS 27.0 vs. Flutter Premium vs. Flutter Standard)
Side-by-side iOS 27.0 Simulator captures of the parity harness with all four interactive lenses lifted simultaneously (top app bar differs by column because it hosts harness toggles). Minor visual differences remain on the Standard tier where multi-pass backdrop refraction is intentionally omitted; appearance varies by OS version and backdrop content.
Quick Start
1. Install
flutter pub add liquid_glass_widgets
Or add to pubspec.yaml (requires Flutter ≥ 3.41.0, Dart ≥ 3.5.0):
dependencies:
liquid_glass_widgets: ^1.24.0
cupertino_icons: ^1.0.8
2. Initialize & Wrap
Call LiquidGlassWidgets.initialize() in main() to preload shader bytecode asynchronously off the GPU thread, then wrap your app with LiquidGlassWidgets.wrap():
import 'package:flutter/cupertino.dart';
import 'package:liquid_glass_widgets/liquid_glass_widgets.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await LiquidGlassWidgets.initialize();
runApp(LiquidGlassWidgets.wrap(child: const MyApp()));
}
3. Build Your First iOS 27 Screen
Use GlassScaffold for each screen — it wires up the background, 2-read hoisted backdrop group, status bar, bar isolation, and scroll-edge effects automatically:
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _tab = 0;
int _range = 0;
bool _notifications = true;
@override
Widget build(BuildContext context) {
return GlassScaffold(
appBar: GlassAppBar(title: const Text('Settings')),
bottomBar: GlassTabBar.bottom(
selectedIndex: _tab,
onTabSelected: (i) => setState(() => _tab = i),
tabs: const [
GlassTab(icon: Icon(CupertinoIcons.slider_horizontal_3), label: 'Controls'),
GlassTab(icon: Icon(CupertinoIcons.layers_alt_fill), label: 'Surfaces'),
GlassTab(icon: Icon(CupertinoIcons.sparkles), label: 'Lenses'),
],
),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
children: [
// Scrolling cards stay opaque (GlassSurfaceStyle.solid) — zero shader cost,
// while interactive controls inside keep their lifted iOS 27 glass lenses.
GlassGroupedSection(
surfaceStyle: GlassSurfaceStyle.solid,
header: const Text('PREFERENCES'),
children: [
Padding(
padding: const EdgeInsets.all(12),
child: GlassSegmentedControl(
segments: const [
GlassSegment(label: 'Day'),
GlassSegment(label: 'Week'),
GlassSegment(label: 'Month'),
],
selectedIndex: _range,
onSegmentSelected: (i) => setState(() => _range = i),
),
),
MergeSemantics(
child: GlassListTile(
title: const Text('Notifications'),
trailing: GlassSwitch(
value: _notifications,
onChanged: (v) => setState(() => _notifications = v),
),
),
),
],
),
],
),
);
}
}
Using MaterialApp or Flutter 3.50+ package:cupertino_ui?
MaterialApp: PassbrightnessResolver: Theme.maybeBrightnessOfso glass widgets follow yourThemeMode, and wrapMaterialApp.builderin a transparentMaterialif you don't mount a MaterialScaffold:runApp(LiquidGlassWidgets.wrap( brightnessResolver: Theme.maybeBrightnessOf, child: MaterialApp( builder: (context, child) => Material(type: MaterialType.transparency, child: child!), home: const MyHomePage(), ), ));- Flutter 3.50+
package:cupertino_ui: Add Flutter's bridge toCupertinoApp.buildersoCupertinoThemeand localizations propagate into SDK-Cupertino packages:builder: (context, child) => CupertinoUiCompatibilityBridge(child: child!),
Choose the Right Surface
| Scenario | Recommended Widget |
|---|---|
| Screen with app bar and/or tab bar | GlassScaffold — manages background, hoisted chrome, bar isolation & scroll edges |
| Custom layout without a standard scaffold | GlassPage — lower-level screen & wallpaper wrapper |
| Inset-grouped Settings / form cards | GlassGroupedSection(surfaceStyle: GlassSurfaceStyle.solid) with GlassListTile |
| Floating glass panel / card | GlassContainer.card or GlassContainer |
| Shared settings across a group of floating buttons | AdaptiveLiquidGlassLayer or GlassBackdropGroup |
Glass vs. Content — Design Philosophy
On iOS 26 and iOS 27, glass is reserved for the floating navigation and control layer above your content, while scrolling list cards and content rows remain opaque:
| Use Glass For | Keep Opaque (GlassSurfaceStyle.solid) |
|---|---|
Navigation bars (GlassAppBar), tab bars (GlassTabBar), toolbars (GlassToolbar) |
Inset-grouped list cards (GlassGroupedSection, GlassContainer.card) |
Floating actions (GlassButton, GlassIconButton, GlassPullDownButton) |
List rows (GlassListTile), feed items, media cells |
Overlays (GlassModalSheet, GlassDialog, GlassMenu, GlassPopover) |
Buttons, toggles & text fields inside solid cards (auto-inherited) |
Active lifted lenses (GlassSwitch, GlassSlider, GlassSegmentedControl) |
Full-screen backgrounds |
Composition Rule — Glass is a Platter, Not a Wrapper: Do not nest refractive
GlassButton,GlassIconButton, orGlassToggle.buttonwidgets inside aglass-mode container (nested controls automatically switch to vibrancy fills viaInheritedLiquidGlass.avoidsRefractionto avoid double-refraction artifacts). PasssurfaceStyle: GlassSurfaceStyle.solidto scrolling cards and sections — child buttons, toggles, pickers, and text fields inheritsolidautomatically whileGlassSwitch,GlassSlider, andGlassSegmentedControlpreserve their full lifted glass lens on touch. (GlassSurfaceStyle.glassremains the1.xdefault;solidbecomes the default on cards and sections in2.0.0.)
Signature Interactions & Navigation
Left: Dark Mode lifted lenses on GlassSegmentedControl, GlassSwitch, GlassSlider, and GlassTabBar · Right: GlassMenu teardrop spring physics and live scrolling refraction in Apple Messages.
Liquid Morph Sheets & Menus
Wrap any trigger in GlassMorphTrigger and pass its anchor to GlassModalSheet.show(morphFrom:) (or showGlassConfirmationDialog(morphFrom:)) for a continuous droplet morph. Pass detents: const {GlassSheetDetent.fitted} to size a sheet to its content, and surfaceStyle: GlassSurfaceStyle.solid for an always-opaque sheet:
GlassMorphTrigger(
builder: (context, anchor) => GlassIconButton(
icon: const Icon(CupertinoIcons.square_pencil),
onPressed: () => GlassModalSheet.show<void>(
context: context,
morphFrom: anchor,
detents: const {GlassSheetDetent.fitted},
builder: (context) => const ComposeSheetBody(),
),
),
)
Deep dive:
docs/LIQUID_MORPH_ENGINE.md·docs/GLASS_MODAL_SHEETS_GUIDE.md
Scroll-to-Minimize Tab Bar (GlassTabBar.minimizable)
Mirrors SwiftUI's .tabBarMinimizeBehavior(_:), collapsing the floating tab bar into the active tab circle on scroll (and sliding bottomAccessory inline, just like Apple Music):
final _scroll = ScrollController();
final _minimize = GlassTabBarMinimizeController(
behavior: GlassBarMinimizeBehavior.onScrollDown, // .automatic, .never, .onScrollUp
);
GlassScaffold(
body: ListView.builder(controller: _scroll, itemBuilder: ...),
bottomBar: GlassTabBar.minimizable(
tabs: _tabs,
selectedIndex: _index,
onTabSelected: (i) => setState(() => _index = i),
minimizeController: _minimize,
scrollController: _scroll,
onMinimizedTabTap: _minimize.expand,
),
)
Pinned Navigation Chrome & Content-Aware Brightness
- Pinned Chrome & Gel Morphs (
GlassNavigationShell+GlassAppBar.pinned): Wrap your app routes inGlassNavigationShellsoGlassAppBar.pinnedkeeps bar chrome pinned across pushes, morphs matchingGlassBarItemidentifiers, clips routes to the iPhone bezel superellipse viaGlassPageTransitionsBuilder, and adapts to iPhone Duo vertical side-bars (GlassVerticalBar). Seedocs/GLASS_NAVIGATION_TRANSITION.md. - Content-Aware Brightness: Set
contentAwareBrightness: trueonGlassScaffoldandadaptiveBrightness: trueonGlassTabBar.bottomto flip foreground icons/labels dynamically using WCAG contrast ratios with dual-threshold hysteresis. For live video or carousels,GlassContentAwareScope(sampleOnFrame: true)samples on active frames and pauses automatically when backgrounded.
Widget Catalog
All 60+ public widgets and scopes are exported from package:liquid_glass_widgets/liquid_glass_widgets.dart:
| Category | Exported Widgets & Primitives |
|---|---|
| Containers & Lists | GlassContainer · GlassContainer.card · GlassGroupedSection · GlassListTile · GlassDivider · GlassDisclosureGroup · GlassReorderableList · GlassStepper · GlassSwipeActions · GlassSwipeActionScope |
| Interactive Controls | GlassButton · GlassIconButton · GlassToggle.button · GlassSwitch · GlassSlider · GlassSegmentedControl (.scrollable) · GlassPullDownButton · GlassButtonGroup · GlassBadge · GlassPageControl · GlassEditButton · GlassEditScope |
| Inputs & Pickers | GlassTextField · GlassTextArea · GlassPasswordField · GlassSearchBar · GlassPicker · GlassFormField · GlassDatePicker (.compact / .graphical / .wheel) · GlassMultiDatePicker |
| Surfaces & Navigation | GlassScaffold · GlassPage · GlassPageRoute · GlassPageTransitionsBuilder · GlassAppBar (.pinned) · GlassBarItem · GlassLargeTitle · GlassTabBar (.bottom / .inline / .searchable / .minimizable) · GlassTabBarExtraButton · GlassTabBarTrailingButton · GlassToolbar · GlassNavigationShell · GlassNavigationStack · GlassNavigationLink · GlassPinnedBarChrome · GlassVerticalBar · GlassScrollEdgeEffect |
| Overlays & Modals | GlassModalSheet · GlassModalSheetScaffold · GlassMorphTrigger · GlassDialog · showGlassConfirmationDialog · GlassMenu (GlassMenuItem, GlassMenuDivider, GlassMenuLabel) · GlassPopover · GlassContextMenu · GlassFullScreenCover |
| Feedback & Effects | GlassProgressIndicator · GlassToast · GlassMaterialize · GlassMaterializeTransition · ProgressiveBlur · GlassGlow |
| Layers, Scopes & Optics | GlassTheme · GlassBackdropGroup (.hoisted) · AdaptiveGlass · AdaptiveLiquidGlassLayer · LiquidGlassLayer · LiquidGlassBlendGroup · LiquidGlassScope · GlassBackgroundSource · GlassContentAwareScope · GlassIsolationScope · GlassAccessibilityScope · GlassAdaptiveScope · GlassMotionScope · GlassInteractionSilence · IndicatorLensOptics · IndicatorJellyPhysics |
Theming, GlassStyle & Quality Tiers
All widgets default to GlassStyle.ios27. Switch presets or customize light/dark variants app-wide via LiquidGlassWidgets.wrap():
runApp(LiquidGlassWidgets.wrap(
child: const MyApp(),
theme: const GlassThemeData.ios27(), // default — iOS 27 paraxial lens & frost
// theme: const GlassThemeData.ios26(), // iOS 26 directional rim & refraction
// theme: const GlassThemeData.minimal(), // shader-free calibrated BackdropFilter
));
Use LiquidGlassSettings.clear(context) (resolving ios27Clear or ios26Clear) for Apple's UIGlassEffect.Style.clear appearance over rich media, GlassThemeVariant + GlassThemeSettings for partial overrides, and GlassSpecularSharpness (.soft, .medium, .sharp) for specular highlight tightness.
Override priority (highest wins): Widget settings: / quality: → GlassPage(themeOverride:) / local GlassTheme → LiquidGlassWidgets.wrap(theme:).
Quality Tiers
| Tier | Renderer | Best For |
|---|---|---|
GlassQuality.premium |
Multi-pass Impeller GLSL (3D paraxial refraction, frost, chromatic dispersion, lens_content_warp.frag) |
Default for floating chrome, overlays & active lifted lenses on Impeller. Caps to standard on Skia/Web. |
GlassQuality.standard |
Single-pass lightweight GLSL (lightweight_glass.frag, interactive_indicator.frag) |
Default for standalone body glass and all Skia / Web / Desktop builds. |
GlassQuality.minimal |
Shader-free BackdropFilter + Rec. 709 saturation + rim stroke |
Pair with const GlassThemeData.minimal() on ultra-constrained GPUs or renderers without custom shaders. |
GlassSurfaceStyle.solid |
Native opaque Cupertino surfaces (0 shaders, 0 blur passes) |
Scrolling inset-grouped cards (GlassGroupedSection), list tiles, and always-opaque modal sheets. |
Optional Wallpaper Refraction on Skia and Web (LiquidGlassScope)
On Skia and Web (GlassQuality.standard), indicator lenses can sample and refract a wallpaper image without Impeller's backdrop texture capture:
GlassScaffold/GlassPage: Passingbackground:wiresLiquidGlassScopeandGlassBackgroundSourceautomatically.- Custom layout: Wrap your
StackinLiquidGlassScopeand mark the backdrop withGlassBackgroundSource:LiquidGlassScope( child: Stack( children: [ Positioned.fill( child: GlassBackgroundSource(child: Image.asset('assets/wallpaper.jpg')), ), Center( child: GlassSegmentedControl( segments: const [GlassSegment(label: 'Day'), GlassSegment(label: 'Week')], selectedIndex: 0, onSegmentSelected: (_) {}, quality: GlassQuality.standard, ), ), ], ), )
Performance & Backdrop Grouping
- 2-Read Hoisted Backdrop Grouping (
GlassBackdropGroup.hoisted): On Impeller, every ungroupedBackdropFiltertriggers a full-screen framebuffer copy.GlassScaffoldautomatically mountsGlassBackdropGroup.hoistedbetween your body and floating chrome — hoisting Pass-1 frost into one shared container and sharing Pass-2 backdrop reads soNnon-overlapping floating surfaces cost 2 total framebuffer copies instead ofN + 1(measured -31.3% dark raster time and -21.0% CPU on iPhone 16 Pro at 120 Hz). Wrap custom floating button rows inGlassBackdropGroup(child: Row(...))or opt overlapping overlays out withGlassBackdropGroup(enabled: false, child: ...). - Order-Independent
O(N)SDF Metaball Blending:LiquidGlassBlendGroupprecomputes cached geometry mattes using a single literal-indexedO(N)2-nearest normal-weighted smooth union so facing edges merge seamlessly while parallel edges stay bulge-free. - Lazy-Mounted Interactive Lenses:
GlassSwitch,GlassSlider, andGlassSegmentedControlhold 0 active shader layers at rest, mounting their lifted optical lens only while pressed or dragged. - Adaptive Runtime Quality (
adaptiveQuality: true,@experimental):GlassAdaptiveScopebenchmarks real raster frame timings and steps down (premium→ frost-off →standard→minimal) under thermal throttling. Seedocs/ADAPTIVE_QUALITY.md. - Debug GPU Budget Monitor & Gyroscope Specular:
GlassPerformanceMonitorlogs actionable diagnostics in debug/profile builds (0cost in release) ifpremiumglass exceeds frame budgets. Feed gyroscope or scroll streams intoGlassMotionScope(stream: ...)to animate specular highlight angles.
Platform Support & PlatformViews
| Platform | Renderer | Active Pipeline |
|---|---|---|
| iOS | Impeller (Metal) | Full 16-shape precompiled .metallib shaders, paraxial refraction, chromatic dispersion |
| Android (Vulkan / GLES) | Impeller (Vulkan / GLES) | Full Vulkan pipeline (8-shape GLES variant to avoid driver stalls); async shader preload |
| macOS | Impeller (Metal) | Full 16-shape precompiled .metallib shaders, keyboard traversal & focus rings |
| Web (CanvasKit / Wasm) | Skia / SkWasm | Single-pass GlassQuality.standard shader + optional LiquidGlassScope refraction |
| Windows & Linux | Skia / Impeller | GlassQuality.standard default; async preload avoids first-frame stalls |
Rendering glass over Maps, WebViews, or Video (PlatformView):
- For modal overlays above a native
PlatformView, passplatformViewBackdrop: trueonGlassModalSheet,GlassMenu, orGlassPopoverto route safely around hybrid-composition capture limitations. - For floating bars over a
PlatformViewwhere native transparency is desired instead of a solid fallback fill, setplatformViewMode: PlatformViewGlassMode.passthroughonLiquidGlassSettings. - See
docs/PLATFORM_SUPPORT.mdfor the complete platform and PlatformView matrix.
Accessibility, Keyboard & RTL
System accessibility preferences work out of the box with zero extra configuration:
| Capability | Built-In Behaviour |
|---|---|
| Reduce Motion | Spring, morph, and jelly physics snap cleanly to their destination |
| Increase Contrast / Reduce Transparency | Replaces custom shaders with high-contrast frosted panels (GlassAccessibilityScope(reduceTransparency: true) available for manual override) |
| On/Off Switch Labels | GlassSwitch renders native I/O track glyphs when MediaQuery.onOffSwitchLabelsOf(context) is enabled |
| Screen Readers & Tap Targets | Level-1 headings on GlassAppBar / GlassLargeTitle, AXSwitch / AXRadioButton traits on macOS & iOS (GlassListTile.semanticsChecked, GlassToggle.button(semanticsInMutuallyExclusiveGroup:)), GlassSlider.semanticFormatterCallback, and ≥ 44 pt semantic/touch targets |
| Keyboard & RTL | Full Tab traversal, Space/Enter activation, Arrow-key adjustment on GlassSlider & GlassSegmentedControl, RTL mirroring, and per-label textDirection on GlassToggle.button |
Note on Reduce Transparency: Until Flutter exposes a dedicated
AccessibilityFeatures.reduceTransparencyflag (flutter/flutter#190318), the library mapsMediaQuery.highContrastOf(context)automatically and supports explicit override viaGlassAccessibilityScope(reduceTransparency: true, ...).
AI Coding Agent Skill
Building with Antigravity, Cursor, Claude Code, or GitHub Copilot? Install the official skill so your assistant writes idiomatic liquid_glass_widgets code instead of hallucinating APIs or hand-rolling BackdropFilter stacks:
- Antigravity / Gemini CLI:
mkdir -p .agents/skills/liquid-glass-widgets curl -sSL https://raw.githubusercontent.com/sdegenaar/liquid_glass_widgets/main/skills/liquid-glass-widgets/SKILL.md \ -o .agents/skills/liquid-glass-widgets/SKILL.md - Claude Code: Save
skills/liquid-glass-widgets/SKILL.mdto.claude/skills/liquid-glass-widgets/SKILL.md. - Cursor: Copy
skills/liquid-glass-widgets/SKILL.mdto.cursor/rules/liquid-glass.mdc. - Other IDEs: See
skills/README.md.
Showcase Apps & Demos
Explore full iOS 27 reference apps and isolated component demos inside example/:
| Showcase App | Run Command |
|---|---|
| Widget Catalog (iOS 27 / iOS 26) | cd example && flutter run |
| Apple Mail (Pinned Chrome & Morphs) | cd example && flutter run -t lib/apple_mail/apple_mail_demo.dart |
| Apple Music (Searchable & Minimizable Bar) | cd example && flutter run -t lib/apple_music/apple_music_demo.dart |
| Apple Podcasts | cd example && flutter run -t lib/apple_podcasts/apple_podcasts_demo.dart |
| Apple Messages (Teardrop Menus) | cd example && flutter run -t lib/apple_messages/apple_messages_demo.dart |
| Apple News | cd example && flutter run -t lib/apple_news/apple_news_demo.dart |
| Apple Lock Screen | cd example && flutter run -t lib/apple_lockscreen/keypad_lock_screen_demo.dart |
| Wanderlust (Travel Showcase) | cd example/showcase && flutter pub get && flutter run |
15 Focused Component Demos (example/lib/demos/)
| Demo | Run Command (from example/) |
|---|---|
indicator_parity_demo.dart — all 4 lifted lens controls side-by-side |
flutter run -t lib/demos/indicator_parity_demo.dart |
glass_modal_sheet_demo.dart — peek / half / full / fitted + droplet morph |
flutter run -t lib/demos/glass_modal_sheet_demo.dart |
glass_menu_demo.dart — all 9 teardrop menu alignments |
flutter run -t lib/demos/glass_menu_demo.dart |
minimizable_bar_demo.dart — scroll-to-minimize & bottomAccessory |
flutter run -t lib/demos/minimizable_bar_demo.dart |
searchable_bar_demo.dart — morphing searchable bottom bar |
flutter run -t lib/demos/searchable_bar_demo.dart |
tab_bar_menu_demo.dart — native pull-down menus on tab bars |
flutter run -t lib/demos/tab_bar_menu_demo.dart |
glass_tab_bar_bottom_demo.dart — lifted tab bar lens masking |
flutter run -t lib/demos/glass_tab_bar_bottom_demo.dart |
glass_tab_bar_scrollable_demo.dart — scrollable inline tab bar |
flutter run -t lib/demos/glass_tab_bar_scrollable_demo.dart |
bottom_bar_tab_width_demo.dart — tabWidth layout patterns |
flutter run -t lib/demos/bottom_bar_tab_width_demo.dart |
nav_bar_patterns_demo.dart — GlassAppBar.pinned & nested nav morphs |
flutter run -t lib/demos/nav_bar_patterns_demo.dart |
content_aware_brightness_demo.dart — WCAG light/dark bar adaptation |
flutter run -t lib/demos/content_aware_brightness_demo.dart |
color_fidelity_demo.dart — LiquidGlassSettings.clear vs regular glass |
flutter run -t lib/demos/color_fidelity_demo.dart |
quality_comparison_demo.dart — Premium vs Standard vs Minimal |
flutter run -t lib/demos/quality_comparison_demo.dart |
lists_pickers_and_nav_demo.dart — swipe actions, reorder, pickers, nav stack |
flutter run -t lib/demos/lists_pickers_and_nav_demo.dart |
shape_debug_demo.dart — superellipse & custom GlassButton shapes |
flutter run -t lib/demos/shape_debug_demo.dart |
Documentation
| Guide | What It Covers |
|---|---|
| Architecture & Engineering Design | 5-layer architecture, GPU shaders, and provenance standards |
| iOS 26 & 27 Optics & Parity Spec | CoreAnimation glassFace optical laws, GPU invariants & parity briefs |
| Platform Support Matrix | Renderer tiers, PlatformViews, and cross-platform shader compatibility |
| Liquid Morph Engine | Spring physics & custom teardrop/droplet morph integration |
| Modal Sheets Guide | Full GlassModalSheet API, fitted detents, solid style & scroll sync |
| Navigation & Pinned Chrome | GlassNavigationShell, GlassAppBar.pinned, bezel clips & iPhone Duo bars |
| Adaptive Quality Calibration | GlassAdaptiveScope benchmarks, cold-start persistence & diagnostics |
| Progressive Blur & Popover Blur Ramp | Variable blur overlays and popover ramp optics |
| Roadmap | Planned milestones and 2.0.0 roadmap |
| Migration Guide (0.x → 1.0) | Breaking changes and upgrade path from 0.x |
| AI Agent Skill & Contributor Guide | Consumer AI skill & repository contribution/shader guidelines |
Testing & Known Limitations
flutter test # Unit, widget & golden tests
flutter test --exclude-tags golden # Fast unit & widget suite (4,800+ tests)
flutter test --tags golden # macOS Impeller golden tests
cupertino_icons: Keepcupertino_icons: ^1.0.8in your app'spubspec.yamlso Cupertino icons do not render as?boxes.- Custom
GlassScaffoldbackgrounds:GlassScaffold.backgroundColorsets both the fallback background and the scroll-edge fade tint; pass it explicitly when using a dark custombackground:image if you want a custom fade color. - Native
PlatformViewcapture: Impeller'sBackdropFiltercannot directly refract nativeUiKitView/AndroidViewtextures — useplatformViewBackdrop: trueon overlays orPlatformViewGlassMode.passthroughon bars (see Platform Support).
Dependencies, Credits & License
Zero third-party pubspec.yaml dependencies. Built exclusively on the Flutter SDK (flutter: sdk: flutter).
Special thanks to Tim Lehmann (whynotmake.it) and the whynotmake-it team:
liquid_glass_renderer(MIT License): Pioneered the foundational fragment shader pipeline, blend group tracking, and texture capture architecture maintained in-tree inlib/src/engine/.motor(MIT License): Designed theCupertinoMotionspring physics model adapted inlib/utils/glass_spring.dart.
See THIRD_PARTY_NOTICES and lib/src/engine/ATTRIBUTION.md for complete notices. Contributions are welcome — see AGENTS.md. Licensed under MIT (LICENSE).
Libraries
- constants/glass_defaults
- Common constants used throughout the liquid_glass_widgets package.
- constants/glass_shadow
- liquid_glass_setup
- liquid_glass_widgets
- Liquid Glass Implementation according to Apple's Guidelines
- theme/glass_interaction_settings
- theme/glass_theme
- theme/glass_theme_data
- theme/glass_theme_helpers
- theme/glass_theme_settings
- types/glass_quality
- types/glass_quality_change_reason
- types/glass_specular_sharpness
- types/glass_style
- types/glass_surface_style
- types/interaction_notification
- utils/accessibility_config
- utils/draggable_indicator_physics
- utils/glass_brightness
- utils/glass_morph_controller
- utils/glass_performance_monitor
- Glass Performance Monitor
- utils/glass_quality_adapter
- Glass Quality Adapter
- utils/glass_spring
- utils/indicator_jelly
- utils/indicator_lens
- utils/liquid_morph_physics
- widgets/containers/glass_card
- widgets/containers/glass_container
- widgets/containers/glass_disclosure_group
- widgets/containers/glass_divider
- widgets/containers/glass_grouped_section
- widgets/containers/glass_list_tile
- widgets/containers/glass_reorderable_list
- widgets/containers/glass_stepper
- widgets/containers/glass_swipe_actions
- widgets/effects/glass_materialize
- widgets/effects/progressive_blur
- widgets/effects/shared/glass_materialize_effect
- widgets/feedback/glass_progress_indicator
- widgets/input/glass_date_picker
- widgets/input/glass_form_field
- widgets/input/glass_password_field
- widgets/input/glass_picker
- widgets/input/glass_search_bar
- widgets/input/glass_text_area
- widgets/input/glass_text_field
- widgets/interactive/glass_badge
- widgets/interactive/glass_chip
- widgets/interactive/glass_page_control
- widgets/interactive/glass_segmented_control
- widgets/interactive/glass_slider
- widgets/interactive/glass_switch
- widgets/interactive/glass_toggle
- widgets/interactive/liquid_glass_scope
- widgets/overlays/glass_action_sheet
- widgets/overlays/glass_confirmation_dialog
- widgets/overlays/glass_dialog
- widgets/overlays/glass_full_screen_cover
- widgets/overlays/glass_modal_sheet
- widgets/overlays/glass_popover
- widgets/overlays/glass_sheet
- widgets/overlays/glass_toast
- widgets/shared/adaptive_glass
- widgets/shared/adaptive_liquid_glass_layer
- widgets/shared/animated_glass_indicator
- widgets/shared/glass_accessibility_scope
- widgets/shared/glass_adaptive_scope
- widgets/shared/glass_content_aware_scope
- widgets/shared/glass_edit_scope
- widgets/shared/glass_effect
- widgets/shared/glass_focus_region
- widgets/shared/glass_focus_ring_painter
- widgets/shared/glass_interaction_silence
- widgets/shared/glass_interaction_state_mixin
- widgets/shared/glass_isolation_scope
- widgets/shared/glass_motion_scope
- widgets/shared/glass_page
- widgets/shared/glass_scroll_edge_effect
- widgets/shared/glass_solid_surface
- widgets/shared/glass_swipe_action_scope
- widgets/shared/inherited_liquid_glass
- widgets/shared/lightweight_liquid_glass
- widgets/surfaces/glass_app_bar
- widgets/surfaces/glass_bar_item
- widgets/surfaces/glass_large_title
- widgets/surfaces/glass_pinned_bar_chrome
- widgets/surfaces/glass_scaffold
- widgets/surfaces/glass_tab_bar
- widgets/surfaces/glass_toolbar
- widgets/surfaces/glass_vertical_bar
- widgets/surfaces/shared/glass_bar_minimize_behavior
- widgets/surfaces/shared/glass_search_bar_config
- widgets/surfaces/shared/tab_bar_accessory_placement
- widgets/surfaces/shared/tab_bar_minimize_controller
- widgets/surfaces/shared/tab_bar_searchable_controller
- widgets/surfaces/shared/tab_bar_types