liquid_glass_widgets 0.21.4
liquid_glass_widgets: ^0.21.4 copied to clipboard
A Flutter UI kit implementing the iOS 26 Liquid Glass design language. Features shader-based glassmorphism, physics-driven jelly animations, and dynamic lighting.
0.21.4 #
β¨ New Features #
- Vertical
GlassSegmentedControlβ fixed controls now acceptdirection: Axis.verticaland an optionalsegmentExtent. Layout, fractional indicator positioning, jelly expansion, drag velocity, snapping, and gesture recognition all follow the vertical axis. The horizontal default and scrollable constructor remain unchanged. Thanks to @F1orian!
π Bug Fixes #
- Impeller shadow corruption fixed β
shadowElevationonLiquidGlassandGlassButtonrendered as solid black circles on Windows, Web, and certain Android emulators due to two known Flutter engine bugs (saveLayertexture corruption on Vulkan andPath.combineclipping failures). The package now selectively bypasses the GPU shadow cutout on affected platforms and uses a safeevenOddwinding rule for the fallback, producing perfect shadows without engine issues.
π§ͺ Example #
- Added an icon-only vertical segmented control to the Interactive page for tap, drag, indicator, and accessibility testing on a physical device.
0.21.3 #
π Bug Fixes #
- SVG and custom icons restored β
SizedBox-wrapped icons (e.g.SvgPicture) were silently stripped from the render tree since0.20.0. TheSizedBox.shrink()sentinel detection now checkswidth,height, andchildfields so a caller-suppliedSizedBoxwrapping a real icon is always rendered correctly. - Searchable bar pill stays active while dragging β the glass indicator on
GlassTabBar.searchablecollapsed back to its resting state when the finger passed over the currently selected tab mid-drag. The thickness spring now includes thetabIsDraggingguard, matching the behaviour already present inGlassTabBar.bottom. JellyClipperImpeller radius guard β the clip radius is now clamped to strictly less than half the indicator's shortest side, preventing a malformedRRectpath that caused content to vanish under Impeller's Metal renderer in certain animation frames.
π§Ή Example #
- Indicator Parity demo calibrated β default refraction set to
1.15(GlassDefaults.refractiveIndex) to match all Apple demos; bothGlassTabBar.inlinevariants now wire live tuner sliders for expansion and pinch strength.
0.21.2 #
π Bug Fixes #
- Extra button stretch disabled over platform views β
GlassTabBarExtraButtonnow correctly disables its stretch effect whenplatformViewBackdrop: true, matching the behavior ofGlassTabBar.bottomand fixing the jittery spring animation. GlassMenuitem scroll wiggle fixed β menu items with wrapped text (e.g.maxLines: 2) could drift sub-pixel vertically during slide-to-select dragging becauseClampingScrollPhysicsallowed fractional scroll offsets even when no overflow was intended. Non-scrollable menus now useNeverScrollableScrollPhysics, locking the content completely in place during drag.GlassPopoverfirst-frame height fixed β the popover was briefly rendered at full-screen height before its content height was known, producing a visible flash and forcing users to wrap content in aSingleChildScrollViewas a workaround. An invisibleOffstagemeasurement pass now runs on Frame 1, letting Flutter's layout engine calculate the exact intrinsic content height before the morph animation starts. The animation launches on Frame 2 with perfect geometry β no mid-flight height correction, no flash, no heuristics.
β‘ Performance #
- Removed unnecessary compositing layer in
GlassBottomBarβ theRepaintBoundarywrapping the icon layer in_buildHighQualityModeis now only mounted whenplatformViewBackdrop: true, where it is required for the Platform View capture path (bug #99). In the common case (platformViewBackdrop: false) the boundary was creating a GPU offscreen texture every frame with no caching benefit, since theJellyClipperchanges on every animation frame. GlassPopoveridle trigger optimised β when the popover is fully closed, the trigger widget now skips unnecessaryTransform,Opacity, andIgnorePointercompositing layers. This removes redundant GPU work in the common idle state.
π§Ή Code Quality #
- Null-safe trigger child access β replaced a
child!force-unwrap inGlassPopoverInternalwith a null-safechild ?? const SizedBox.shrink()fallback, preventing a hard crash ifchildis ever omitted in a future refactor.
π§ͺ Example #
- Refraction slider added to Indicator Parity demo tuner β a "Refraction (n)" slider (range 1.0β2.0, default 1.59 matching
GlassTabBar.bottom's internal default) for tuning therefractiveIndexon the Premium (Impeller) glass indicator. Standard indicators do not perform background capture so the parameter has no visual effect there.
0.21.1 #
π Bug Fixes β Standard indicator parity #
- Two-pills misalignment fixed β at
GlassQuality.standard, the background rim and glass lens now share the same shape geometry (ShapeDecoration) and ride the same jellyTransform, eliminating the visible separation mid-morph. Regression reported againstGlassTabBar.inline/ segmented controls. - Indicator collapse on drag fixed β the glass indicator no longer morphs back to the resting pill when dragging over the selected tab. The thickness gate now includes
tabIsDraggingso the indicator stays fully active for the entire gesture duration. - Standard rim thickness normalised β the indicator rim on
GlassQuality.standardis now proportionally mapped fromindicatorSettings.thickness(same value as Premium) rather than scaling from the raw glass-depth value, which produced a ~2.8 px border. The result is a fine hairline that gracefully matches the Premium look on Standard-quality devices.
0.21.0 #
β¨ New Features #
GlassModalSheetdrag progress β controller now exposes aprogressgetter andprogressListenablereporting the live 0β1 drag position between halfβfull snap points, so hosts can drive coordinated UI in real time. (#148, @jfhair)GlassTabBar.inlinespring control β the.inlinefactory now acceptsspringDescription, matching the other factory constructors. Previously inline tab bars were locked to the shared default spring. (#149, @jfhair)LiquidGlassSettings.ambientRimβ tunable full-perimeter rim on the moving indicator pill. Defaults match Apple Music's segmented control (brighter in light mode, off in dark). (#150, @jfhair)AnimatedGlassIndicatorshadow βshadowElevation/shadowinindicatorSettingsnow correctly paints a drop shadow on the glass jelly. Previously these values were silently ignored. (#151, @jfhair)
π Bug Fixes β PlatformView gesture stability #
- Tab bar freeze fixed: Intermittent freeze where the tab indicator stopped
responding after interacting over an iOS
PlatformView(e.g. a map or WebView). The iOS gesture arena can silently drop terminal callbacks, leaving the recognizer wedged. Fixed with proactive cleanup onPointerDown, post-frame recovery, and a gesture ID guard to prevent rapid-tap state corruption. - Hybrid gesture mode on
platformViewBackdrop: true: When the tab bar floats over aPlatformView, the visual indicator now animates to its new position instantly on touch-down (matching native iOS responsiveness), while the actual tab content swap is deferred safely to touch-up. This prevents the iOS UIKit view system from dropping the touch stream mid-gesture due to a mid-frame unmount of thePlatformView. No impact on any screen whereplatformViewBackdropisfalseβ those continue to swap instantly on down. - Stretch disabled on
platformViewBackdrop: true: Flutter'sBackdropFiltermust re-acquire the native pixel buffer every time its bounding box changes. Stretch animations resize the glass container, causing a one-frame flicker over aPlatformView. Stretch is now skipped on all bar elements whenplatformViewBackdropis set; press-scale (interactionScale) is unaffected because it is a GPU-level transform that leaves the backdrop bounds stable. No impact on any other screen or platform.
0.20.1 #
π Bug Fix β GlassButton.custom layout expansion #
Fixes: GlassButton.custom unexpectedly expanding to fill bounded parent constraints (e.g., inside AppBar actions) (#146).
GlassButton.customheightnow correctly defaults tonull(matching documented behavior).- The button now properly shrink-wraps to its content when explicit width/height are not provided.
- Migration: No breaking changes. If you were relying on the undocumented
56pxdefault height, explicitly setheight: 56.
0.20.0 #
π₯ Breaking β GlassListTile divider refactor #
GlassListTile no longer draws its own divider. The isLast, showDivider,
and dividerIndent parameters have been removed.
Rationale: A list tile should be a clean, position-agnostic item. Divider rendering is a layout concern that belongs to the parent container.
Migration #
Inside GlassGroupedSection β no changes needed.
GlassGroupedSection now automatically injects GlassDividers between tiles
with smart leading-indent detection (56px if the preceding tile has a leading
widget, 16px otherwise). The last tile never gets a trailing divider.
Standalone column layouts β compose GlassDivider explicitly:
// Before:
Column(children: [
GlassListTile(title: Text('A')), // showDivider: true (default)
GlassListTile(title: Text('B'), isLast: true), // suppresses divider
])
// After (standard Flutter composition pattern):
Column(children: [
GlassListTile(title: Text('A')),
GlassDivider(indent: 16),
GlassListTile(title: Text('B')),
])
This aligns with Flutter's own ListTile + Divider composition model.
β¨ New β GlassTabBar.inline #
A compact glass tab bar for pinned content-filter sections β sits fixed between a page header and its scrollable list, not inside the scroll view itself.
Performance note:
GlassQuality.premiumre-runs the full shader pipeline whenever the backdrop changes. Placing the bar inside a scroll view invalidates the backdrop on every scroll frame. Pin it outside the scrollable region or drop toGlassQuality.standardif embedding inside a list.
GlassTabBar.inline(
tabs: const [
GlassTab(label: 'For You'),
GlassTab(label: 'Following'),
GlassTab(label: 'New'),
],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
)
Key differences from GlassTabBar.bottom:
- Zero padding β sits flush in its parent container.
- Compact height (40px) with a full stadium shape (
barBorderRadius: 100, clamped toheight/2). - Indicator pill automatically matches the track corner radius (
indicatorBorderRadiusdefaults tobarBorderRadius). - Indicator expansion
h:12, v:10β same horizontal weight asGlassSegmentedControlandGlassTabBar.bottom, +2px vertical to compensate for the shorter bar height giving the glass pill proportional visual mass. indicatorPinchStrength: 0.4β aligned with all other pill controls.- Magnification disabled (
1.0x) β text labels never grow on selection. - Text-only tabs render with correct vertical centering (no icon slot consuming space).
extraButtonnot supported (structural navigation feature only).
All standard physics parameters (indicatorPinchStrength, indicatorExpansion,
indicatorSettings, quality) are still fully configurable.
See the updated Indicator Parity demo (indicator_parity_demo.dart) where
GlassTabBar.inline now appears alongside the other five pill widgets β including
a text-only variant (40px) and an icon + text variant (52px) β with live tuning sliders.
0.19.7 #
π Bug Fixes #
-
GlassTabBar.bottom/GlassBottomBarβ fixes RTL support (#143, @naeemeltaief). The pill and tap/drag hit-testing now correctly align with the visually reversed tab order under RTL. The bottom layout normalises the tab data, selected index and callback for RTL, and pins only the two inner tabRows to LTR β leavingindicatorExpansion,tabPaddingand all text to resolve against the ambient direction as expected. Consumers no longer need to forceDirectionality.ltrand reverse tabs by hand. +2 tests. -
AnimatedGlassIndicatorβ restores the resting selection pill inside aGlassContainer(#144, @jfhair). The background pill was permanently hidden whenever an ancestor setavoidsRefraction, which is a steady-state layout flag onGlassContainerβ not a transient capture signal. The guard was incorrect and is removed. The pill now renders correctly in all contexts. No API change. +1 test.
0.19.6 #
β¨ New β GlassLargeTitle + GlassLargeTitleController #
First-class iOS 26 large-title + search-bar collapse. Replaces manual
ScrollController + setState wiring with a single controller and two
widgets.
Two-phase collapse #
- Phase 1 β large title fades out (
Curves.easeIn, rubber-band overscroll stretch). - Phase 2 β optional inline search bar collapses under the nav bar immediately after.
New API #
GlassLargeTitleβ sliver widget. Drop it as the first sliver in anyCustomScrollView.searchBar: Widget?β Phase 2 collapse (e.g.GlassSearchBar).trailing,fontSize,fontWeight,letterSpacing,padding,searchBarPadding,color.
GlassLargeTitleControllerβ owns theScrollController, exposescollapseProgressandsearchBarCollapseProgress. Self-calibrates to Dynamic Type viareportMeasuredHeight/reportSearchBarHeight.GlassAppBar.largeTitleControllerβ new optional param. Bar title cross-fades in as the large title collapses. Non-breaking.
final _ctrl = GlassLargeTitleController(); // dispose in State.dispose()
// Phase 1 only
GlassLargeTitle(text: 'Chats', controller: _ctrl)
// Phase 1 + 2
GlassLargeTitle(
text: 'Messages',
controller: _ctrl,
searchBar: GlassSearchBar(placeholder: 'Search', onChanged: (_) {}),
)
Demo #
- Pattern 2 updated to new API. Pattern 7 (Large Title + Search Bar) added.
- Apple Messages demo migrated from manual
AnimatedOpacitytoGlassLargeTitle.
+10 tests. 2,291 total, all passing.
β‘ Performance β GlassBottomBar Indicator (Impeller) #
GlassBottomBarindicator β eliminates the liveBackdropFilterLayeron Impeller premium, replacing it with a deterministictoImageSynccapture path. Fixes the opaque-white indicator rendering on physical iOS (#99) and improves drag performance by removing a redundant compositor pass.
π§ GlassGroupedSection β Header/Footer styling #
- Header and footer text is now styled automatically via
DefaultTextStyle(CupertinoColors.secondaryLabel, 13pt) β callers no longer need to style them manually. - Margin is now applied via
Paddingwrapping the full section rather than on the innerGlassCard, fixing card-edge clipping when a header or footer is present. - Import changed to
cupertino.dartfor correctCupertinoColorsresolution.
π Dart doc improvements #
GlassContainer,GlassCard,GlassGroupedSection,GlassSegmentedControlβ added β οΈ Anti-Pattern sections documenting the glass-in-glass restriction: placing interactive glass controls inside a container degrades refraction and clips jelly animations.
0.19.5 #
-
LiquidGlassSettingsβ addsplatformViewFallbackColor(#138, @jfhair). SplitsbackerColor's dual role:backerColorremains the aesthetic backer pad; the new field controls theuBackgroundFallbackshader uniform (PlatformView fill). Fully backwards-compatible β defaults tonull, falling back tobackerColor. -
GlassModalSheetβ removes the interiorBoxShadowthat bled through the glass as a vignette (#137, @jfhair). Elevation now flows viaLiquidGlassSettings.shadowElevation. PassshadowElevation: 0to disable entirely.
0.19.4 #
β¨ Enhancements β GlassButtonGroupItem.menu & GlassPullDownButton improvements #
GlassButtonGroupItem.menu β whole-pill liquid glass morph #
Adds a new GlassButtonGroupItem.menu named constructor that turns any item in a
GlassButtonGroup.icons pill into a pull-down menu trigger.
When tapped, the entire pill morphs into the menu β the full GlassButton.custom
shell becomes the GlassMenu trigger, so the whole group shape liquefies and expands
into the menu card. This matches the iOS 26 GlassEffectContainer morph pattern where
the source shape, not just the tapped slot, participates in the transition.
GlassButtonGroup.icons(
items: [
GlassButtonGroupItem(icon: Icon(CupertinoIcons.chart_bar), onTap: () {}),
GlassButtonGroupItem(icon: Icon(CupertinoIcons.clock), onTap: () {}),
GlassButtonGroupItem.menu(
icon: Icon(CupertinoIcons.ellipsis),
menuItems: [
GlassMenuItem(title: 'Add to Watchlist', icon: Icon(CupertinoIcons.star), onTap: () {}),
GlassMenuItem(title: 'Share', icon: Icon(CupertinoIcons.share), onTap: () {}),
GlassMenuDivider(),
GlassMenuItem(title: 'Remove', icon: Icon(CupertinoIcons.trash), isDestructive: true, onTap: () {}),
],
menuAlignment: GlassMenuAlignment.topRight, // optional
menuWidth: 200, // optional, default 200
),
],
)
Notes:
- Only the first
GlassButtonGroupItem.menuin the list is used as the menu trigger; any subsequent menu items are treated as plain tap items. - Accepts both
GlassMenuItemandGlassMenuDivider, matchingGlassMenu.itemsdirectly. - Non-menu siblings in the group continue to fire their own
onTapindependently. - Works with both
Axis.horizontalandAxis.verticalgroups.
Alternatively β group + standalone GlassPullDownButton
For cases where the menu trigger is a separate, visually distinct action from the
group (e.g. a trailing overflow button next to a row of chart controls), compose a
GlassButtonGroup alongside a standalone GlassPullDownButton. The pull-down
button morphs independently and fully, with no pill residue:
Row(
children: [
GlassButtonGroup.icons(
items: [
GlassButtonGroupItem(icon: Icon(CupertinoIcons.chart_bar), onTap: () {}),
GlassButtonGroupItem(icon: Icon(CupertinoIcons.clock), onTap: () {}),
],
),
SizedBox(width: 8),
GlassPullDownButton(
icon: Icon(CupertinoIcons.ellipsis),
menuAlignment: GlassMenuAlignment.topRight,
items: [
GlassMenuItem(title: 'Add to Watchlist', icon: Icon(CupertinoIcons.star), onTap: () {}),
GlassMenuItem(title: 'Share', icon: Icon(CupertinoIcons.share), onTap: () {}),
GlassMenuDivider(),
GlassMenuItem(title: 'Remove', icon: Icon(CupertinoIcons.trash), isDestructive: true, onTap: () {}),
],
),
],
)
.menu item (shared pill) |
group + standalone | |
|---|---|---|
| All actions in one pill | β | β |
| Entire pill morphs | β | β |
| Menu button morphs independently | β | β |
| Best for | Overflow within a related set | Separate trailing action |
GlassPullDownButton improvements #
itemswidened toList<Widget>β now acceptsGlassMenuDivideralongsideGlassMenuItem. Source-compatible: existingList<GlassMenuItem>code compiles and behaves identically. TheonSelectedcallback is applied only toGlassMenuIteminstances.menuAlignmentexposed β newGlassMenuAlignment?parameter forwarded to the underlyingGlassMenu. Defaults tonull(auto-detect from screen position) β fully backward-compatible.
π Bug Fixes β PlatformView Frost Halo & GlassButton Dispose-Race (#134, #135) #
Both fixes contributed by @jfhair.
LiquidOval rectangular blur halo over a PlatformView (#134) #
Problem: Any glass surface with a LiquidOval shape (the default for GlassButton,
GlassIconButton, the collapsed search/dismiss pill, and GlassBottomBarExtraButton)
rendered a rectangular blur halo when platformViewBackdrop: true routed it through the
_FrostedFallback BackdropFilter path. The halo matched the widget's bounding box rather
than its circular outline.
Root cause: Flutter engine PR #177551 (3.41+) forwards ClipRRect clip data to the iOS
PlatformView mutator stack, allowing a descendant BackdropFilter to be bounded correctly
over a hybrid-composed view. The same forwarding does NOT apply to ClipPath β and
LiquidOval (unlike LiquidRoundedSuperellipse) was routing through ClipPath, leaving
the BackdropFilter unclipped.
Fix: _ShapeClip now accepts a platformViewBackdrop flag. When set, any shape whose
border radius can be expressed as a BorderRadius (including LiquidOval β
circular(9999), LiquidRoundedRectangle, and their vertical variants) is routed through
ClipRRect instead of ClipPath. The clip is then forwarded to the PlatformView mutator
stack and the frost is bounded cleanly to the shape. Off a PlatformView the original
ClipPath is used (true ellipse). The flag is threaded through all _ShapeClip call sites
in _FrostedFallback β the blur body, the content clip, and the specular rim β as well as
the backer dimming pad in AdaptiveGlass._wrapWithBacker.
Completes the partial fix shipped in 0.19.3 and fully resolves the rectangular-blur regression first reported in #79.
GlassButton crash when disposed mid-press (#135) #
Problem: Tapping a GlassButton that is removed by the very tap that activates it
(e.g. a collapsed bar restore button that expands the bar and disposes itself) could throw:
AnimationController.reverse() called after AnimationController.dispose()
(assert _ticker != null)
A queued pointerUp or pointerCancel was still dispatched to the now-disposed
RenderPointerListener, and the press handler called _saturationController.reverse()
after dispose().
Fix: All six tap/pointer press handlers in _GlassButtonState now guard on !mounted
before touching _saturationController. A disposed State always has mounted == false,
so the handler bails safely without touching the controller.
Surfaces frequently in apps that morph or collapse a bar on the tap of a glass control over a PlatformView (the pattern introduced in #127/#79).
0.19.3 #
π Bug Fixes β Search Pill Colors & PlatformView Compositing #
- Fixed an issue where the
SearchPillicon colors (search, mic) would incorrectly render as black when using dark glass (glassColor: Colors.black26) over an iOS PlatformView. The root cause was that the color resolution used the OS system brightness (light) instead of the glass brightness (dark), causingCupertinoDynamicColor.labelto always resolve to its light-mode black variant. The widget now resolves colors throughGlassTheme.brightnessOf()β the package's single brightness authority β and explicitly passes the resolved color viaIconThemeDatato guarantee white glyphs on dark glass regardless of system brightness. - Mitigated a Flutter engine clipping bug over PlatformViews by ensuring
LiquidRoundedSuperellipseandLiquidOvalcorrectly clip their bounds using an outerClipRRectwhen rendering over an iOS PlatformView, preventing blur bleed outside the circular button shape. - Updated the
google_maps_demoto correctly demonstrate how to configureselectedIconColor,unselectedIconColor, andsearchIconColorfor dark glass bottom bars to ensure all tab elements remain visible over the map layer.
0.19.2 #
π Bug Fixes β PlatformView Gesture & Rendering #
This release resolves a pair of related issues that caused the glass bottom bar to freeze and render incorrectly when floating over an iOS PlatformView (e.g. a Mapbox map). All three fixes were contributed by @jfhair via detailed PRs that included root-cause analysis, regression tests, and working reproductions. Many thanks for the exceptional quality of this contribution.
Gesture freeze over an iOS PlatformView (#127) #
Problem: GlassTabBar.searchable (and GlassBottomBar) would freeze when
the draggable indicator was dragged or tapped while the bar floated over an iOS
PlatformView. The freeze was permanent until the widget was rebuilt or disposed.
Root cause: iOS reconstructs the platform-view clip chain whenever a clip
layer is added or removed mid-gesture. The engine responds by cancelling the
active touch, which left the bar's GestureDetector recognizer wedged β it
never received a terminal callback (onDragEnd / onDragCancel) and stopped
responding to input. The most frequent trigger was the indicator's innerBlur
frost layer unmounting at drag-start (a clip-add/remove cycle).
Fix β two-part:
- Primary fix (PR #127): The indicator's frost
ClipRRect + BackdropFilterlayer now stays mounted across the full drag lifecycle by tracking a persistentbool _frostMountedflag inAnimatedGlassIndicator. This eliminates the clip-add/remove cycle that was triggering the iOS clip-chain reconstruction. - Backstop fix (PR #127):
TabBarDragGestureMixingains agestureEpochcounter, a_gestureActiveliveness flag, and a rawListeneron theGestureDetectorsubtree. If the raw pointer-up or pointer-cancel arrives while_gestureActiveis stilltrue(i.e. the terminal callback was silently dropped by the platform-view gesture arena),recoverIfGestureStuckis called: it selects a fallback tab, bumpsgestureEpoch(forcing theGestureDetectorto be torn down and recreated viaValueKey), and clears the stuck state. Covers both the tap-without-cancel and drag-start-without-end freeze signatures.
PlatformView backdrop routing (#128) #
Problem: Setting platformViewBackdrop: true on a bar had no visible effect
for the glass indicator or bar body β the premium/standard Impeller shader paths
read a captured backdrop that excludes hybrid-composed PlatformViews, so the
glass rendered inert (opaque black or clear) over a map.
Fix: AdaptiveGlass now routes any surface with platformViewBackdrop: true
to the frosted fallback (_FrostedFallback) regardless of the requested quality
tier. The frosted fallback uses a live BackdropFilter, which correctly blurs
hybrid-composed PlatformViews. _FrostedFallback also overrides the
isInteractive blur-omission that would otherwise skip the blur for interactive
indicator surfaces β over a PlatformView the live blur must always run.
Premium glass goes black over a PlatformView β backerColor fallback (#129) #
Problem: At GlassQuality.premium over a PlatformView, the Impeller shader
sampled a captured backdrop that contained only transparent black where the
PlatformView sat. With no real background pixels to refract, the glass lens
rendered black.
Fix: A new uBackgroundFallback (vec4) uniform was added to
liquid_glass_final_render.frag. The shader composites the fallback colour
over the captured backdrop using a standard over blend weighted by the
backdrop's own alpha β where the backdrop is real (alpha β 1) it is left
untouched; where it is transparent black (alpha β 0, i.e. over a PlatformView)
the fallback fills in. backerColor from LiquidGlassSettings is bound to
this uniform at render time, giving the premium lens a solid colour to refract
instead of transparent black.
Extra button platformViewBackdrop threading (follow-up, this release) #
GlassTabBarExtraButton previously ignored the bar's platformViewBackdrop
flag β the internal BottomBarExtraBtn widget was not forwarding it to the
underlying GlassButton, so the extra button continued to use the inert shader
path even when the rest of the bar correctly used the frosted fallback.
platformViewBackdrop is now threaded through BottomBarExtraBtn and both
call sites (TabBarBottomLayout, TabBarSearchableLayout) to GlassButton.
0.19.1 #
π‘οΈ Stability Improvements #
Addresses production crash and ANR reports seen with v0.19.0 on Flutter 3.44.2 (tracked in flutter/flutter#187140). These are exposure-window mitigations β the root cause is a Flutter engine issue and requires an engine-level fix.
Changes #
GlassEffect & LightweightLiquidGlass β lifecycle-aware Ticker suspension
Both state classes now implement WidgetsBindingObserver and halt background-capture
Tickers during AppLifecycleState.inactive, paused, and hidden. Captures restart
one frame after resumed. This reduces GPU texture activity during surface transitions
(rotation, split-screen, keyboard resize) which is the window where engine-level
crashes and ANRs are most likely to occur.
GlassEffect & LightweightLiquidGlass β _isDisposed guard
A _isDisposed flag prevents Ticker callbacks and async .then() continuations
from accessing GPU resources after dispose() has completed, guarding against
post-frame-callback / dispose races during rapid navigation.
LiquidGlassWidgets.initialize() β faster startup
The Impeller pipeline warm-up is no longer awaited inside initialize(). It now
runs after the first frame via addPostFrameCallback, removing a ~16ms delay from
the startup critical path. Shader disk-loads are still awaited as before.
Debug log cleanup
Removed stale debugPrint success messages from GlassEffect and LightweightLiquidGlass
shader pre-warm paths (β Shader precached, β Created unique shader instance). These
fired on every debug startup for every app using the package. Failures still surface via
the existing [LightweightGlass] Pre-warm failed: error log. The [LiquidGlass]
startup bracket (Initializing... / Initialization complete.) and the
PerformanceMonitor started log are retained as actionable developer information.
0.19.0 #
π₯ Breaking: Pre-v1.0 Public API Cleanup #
A pre-release naming audit to establish consistent, idiomatic conventions before v1.0 locks the API.
Renames #
| Old | New | Reason |
|---|---|---|
GlassBottomBarExtraButton |
GlassTabBarExtraButton |
Tracks parent rename GlassBottomBar β GlassTabBar |
GlassGroupItem |
GlassButtonGroupItem |
Mirrors Flutter's DropdownMenuItem pattern |
SheetState |
GlassSheetState |
Prevents collision with Material 3 sheet infrastructure |
SheetMode |
GlassSheetMode |
Same β too generic as a bare name |
FillTransition |
GlassFillTransition |
Too generic as a bare name |
ExtraButtonPosition |
GlassExtraButtonPosition |
Ambiguous without prefix |
Migration: A
@Deprecatedtypedef forGlassBottomBarExtraButtonis provided. All other old names will produce compile errors β migration is mechanical find-and-replace.
GlassSegment β new concrete class #
GlassSegment was previously a typedef alias for GlassTab. It is now a proper class with a focused API for GlassSegmentedControl:
// GlassSegment β for GlassSegmentedControl only
GlassSegment({ Widget? icon, String? label, String? tooltip, String? semanticLabel, bool enabled = true })
// GlassTab β for GlassTabBar.bottom() and GlassTabBar.searchable()
GlassTab({ Widget? icon, Widget? activeIcon, String? label, Color? glowColor, double? thickness })
Fields like activeIcon, glowColor, and thickness are navigation-specific and only exist on GlassTab. GlassSegment adds tooltip and enabled (with built-in disabled rendering at 38% opacity).
Barrel hygiene #
Internal types (SheetSnapshot, SheetGeometry, GesturePhase, GestureArena, FrozenState) are no longer accessible from the package barrel. These were implementation details that leaked through part file exports.
β‘ Performance #
- Shader:
interactive_indicator.fragβ replacedpow()calls with multiply chains; collapsed duplicate rim pass; zero transcendental functions in highlight path. - Shader:
liquid_glass_final_render.fragββΆβxcomputed via sqrt cascade (3 SFU vs 2 transcendentals);sceneSDFsamples reduced from 5 β 4. - Dart:
resolveAdaptiveRadiusscoped toMediaQuery.viewPaddingOf+MediaQuery.sizeOfβ glass widgets no longer rebuild on keyboard or unrelatedMediaQueryDatachanges. - Dart: Searchable tab bar and
GlassSegmentedControlspring animations now useListenableBuilderscoped to the indicator subtree. Verified on-device: zeroState.build()calls during 120Hz spring animation.
π Fix #
LiquidGlassWidgets.initialize()now pre-warms all four shaders βliquid_glass_geometry_blended.fragandliquid_glass_final_render.fragwere previously lazy-loaded, causing first-frame jank.GlassSegment.enabled = falsenow blocks tap/tapDown β disabled segments rendered at 38% opacity but still firedonSegmentSelectedin both fixed-width and scrollable modes. Tap andonTapDownhandlers now early-return when the target segment is disabled.
0.18.6 #
π Fix: Glass widgets now honour app ThemeMode, not OS dark mode #
Resolves a class of UI inconsistency where glass widgets incorrectly read the device/OS brightness instead of the app's brightness. The most visible symptom was GlassBottomTabBar shadows disappearing when the device was in Dark Mode but the app was pinned to Light Mode via MaterialApp(themeMode: ThemeMode.light).
Root cause #
Every glass widget that needed to decide between light/dark colours or shadow visibility called either CupertinoTheme.of(context).brightness or MediaQuery.platformBrightnessOf(context) directly. Both of these APIs fall back to the OS/device setting and are blind to MaterialApp.themeMode.
Fix: Centralised brightness cascade #
A new GlassTheme.brightnessOf(context) authority now governs all brightness decisions in the library. It resolves via a four-level cascade:
GlassThemeData.brightnessβ new field; an explicit developer override pinned in theGlassThemewidget tree (highest priority).CupertinoThemeData.brightnessβ explicit Cupertino pin (non-null only; intentional opt-in).Theme.maybeBrightnessOf(context)β MaterialThemeMode.light/.dark/.system, honouringMaterialApp.themeMode.MediaQuery.platformBrightnessOf(context)β OS/device setting (safe fallback).
Changes #
- New:
lib/utils/glass_brightness.dartβresolveGlassBrightness(context)utility (package-private). - New field:
GlassThemeData.brightnessβ explicit brightness override for fine-grained glass-subtree control. Accepted by both the default andGlassThemeData.simple()constructors. - New method:
GlassTheme.brightnessOf(context)β the single, mandatory brightness authority for the entire library. - Fixed: Shadow suppression in
GlassBottomTabBar,GlassSearchableBottomBar,AdaptiveLiquidGlassLayer, andAdaptiveGlass(_FrostedFallback). - Fixed: Shader
backdropLumaproxy inGlassEffect(controls glass strength in the GPU path). - Fixed: Light/dark colour selection in 20+ widget files across
interactive/,containers/,input/,overlays/, andsurfaces/layers.
Tests #
Three new test files cover every level of the cascade:
test/utils/glass_brightness_test.dartβ unit tests forresolveGlassBrightness.test/theme/glass_theme_brightness_test.dartβGlassTheme.brightnessOfintegration tests including the canonical regression scenario.test/theme/glass_theme_data_brightness_test.dartβGlassThemeData.brightnessoverride field,copyWith, equality, and backward-compat tests.
0.18.5 #
π§ Corrected minimum SDK constraint β Flutter β₯ 3.41.0 #
- Fix: Raised the minimum Flutter constraint to
3.41.0. ThefilterQualityparameter onFragmentShader.setImageSampler()was actually introduced in Flutter 3.41.0 (commitadd442b29c), not 3.24.0 as previously stated. This prevents users on 3.38.x from failing at compile time. - Reverted: Raised the internal
metaconstraint back to^1.18.0since Flutter 3.41.0 guarantees this version is available.
0.18.4 #
- Fix: Loosened the
metadependency constraint to^1.12.0(instead of^1.18.0) to avoid pub resolution conflicts for users on older Flutter SDKs whereflutter_testis bound tometa 1.17.0.
0.18.3 #
β¨ Per-state label text style on bottom bars β selectedLabelStyle / unselectedLabelStyle #
Adds selectedLabelStyle / unselectedLabelStyle (TextStyle?) to GlassTabBar.bottom, GlassTabBar.searchable, and the deprecated GlassBottomBar / GlassSearchableBottomBar.
This complements the selectedLabelColor / unselectedLabelColor parameters by letting callers set the selected/unselected label's font family, weight, and letter-spacing per state β needed to match Apple's tab bar, where the selected label is heavier than a single shared textStyle can express.
The per-state style is merged over the base label style, so it overrides only the fields it sets and keeps the resolved per-state label color unless the style provides its own. Both default to null β existing behavior unchanged.
Also fixes a related precedence bug: an explicit selectedLabelColor / unselectedLabelColor was silently dropped whenever a textStyle was also supplied (the per-state color only fed the fallback style). It now overrides the base color β including a color baked into textStyle β while textStyle-only callers are unaffected.
β¨ innerBlur β Apple-style rest-blur behind the selected tab #
The innerBlur parameter on GlassTabBar.bottom/.searchable (and the deprecated GlassBottomBar/GlassSearchableBottomBar shims) now renders. It was declared and threaded barβinternal, but never forwarded to the indicator, and AnimatedGlassIndicator had no implementation. This wires it through the tab-bar internals and adds the rest-gated BackdropFilter.
It paints a backdrop blur behind the resting selected pill β the iOS 26 "frost at rest" look β with the sigma scaled by the pill's resting opacity, so the frost is full when settled and fades out as it morphs into the liquid-glass lens during a drag/tap (motion stays crisp).
0.0(default) disables it β no behavior change for existing callers.- Only the background-painting indicator is affected (reads through a translucent
indicatorColor).
β¨ platformViewBackdrop on the public glass widgets #
Follows up #94 by exposing the premium-over-PlatformView flag on the remaining public widgets β GlassContainer, GlassButton, GlassIconButton, GlassButtonGroup, GlassMenu, and GlassModalSheet β so apps can render premium glass cleanly over an iOS PlatformView (e.g. a Mapbox MapWidget) for any control, not just the bottom bar.
Each gets an explicit platformViewBackdrop parameter defaulting to false (zero overhead / no behavior change for callers that don't need it), forwarded to the underlying AdaptiveGlass. For GlassModalSheet the flag threads through GlassModalSheetScaffold and the sheet state down to the _SheetLayout's glass. Adds widget tests covering the simple-widget forwards.
π§Ή Removed β GlassTintBlend (a no-op since 0.17.0) #
GlassTintBlend (added in #107) and the LiquidGlassSettings.tintBlend field have been removed.
Since the 0.17.0 shader rewrite, tintBlend was never wired into the renderer β it was packed into no uniform, so setting it had no effect: every surface used the automatic chroma-gated blend regardless of the value. We only caught this during real-device tuning, after all the related PRs had already landed.
The automatic behavior is unchanged. applyGlassColor still picks luminosity-preserving blending for chromatic tints and flat blending for achromatic tints. Recipes that previously passed tintBlend: flat for achromatic (white / grey / near-black) tints render identically, because the chroma gate already resolves those to the flat path.
Breaking, but inert: code that passed LiquidGlassSettings(tintBlend: β¦) must drop the argument. No rendered output changes.
π§ SDK constraints bump (corrected in 0.18.5) #
Raised minimum Flutter to >=3.24.0 β this was incorrect. The actual minimum is 3.41.0, corrected in 0.18.5.
0.18.2 #
Rendering Quality #
-
Fix: Eliminated stair-step aliasing on
AnimatedGlassIndicator/GlassEffectpill edges during press animations. Root cause:FragmentShader.setImageSampler()defaults toFilterQuality.none(Nearest-Neighbor). The 4 % press-scale animation was block-replicating geometry texels into 2Γ2 stair-step patterns visible as jagged fringe on the pill rim. Resolution: PassfilterQuality: FilterQuality.mediumto everysetImageSampler()call inliquid_glass_render_object.dart,glass_effect.dart, andlightweight_liquid_glass.dart. Zero GPU cost β hardware bilinear filtering happens in a single texel-unit clock cycle. -
Fix: Eliminated 2Γ2 blocky normal artifacts on glass pill edges (all platforms, most visible on iOS/macOS Metal). Root cause: Metal's
dFdx/dFdyevaluate in 2Γ2 pixel quads, so all four neighbours share one gradient vector. At the high-contrast white rim of the pill this produces a coarse stair-step normal map that manifests as jaggy rainbow banding regardless of scale. Resolution: Replaced hardware derivatives with per-pixel central finite differences inliquid_glass_geometry_blended.frag(dx = sceneSDF(p + 0.5) β sceneSDF(p β 0.5)). Costs 4 extra SDF evaluations per geometry pixel β negligible on a cached, one-shot geometry pass. -
Fix: Restored full rim brightness after the anti-aliasing band was widened. Root cause: The previous asymmetric
smoothstep(-smoothing, 0.0, sd)placed the mathematical pill boundary (sd = 0) at the dark end of the alpha ramp (alpha = 0). The rim-lighting peak lives exactly atsd = 0, so it was multiplied by zero and rendered invisible. Resolution: Centred the smoothstep around the boundary βsmoothstep(smoothing * 0.5, -smoothing * 0.5, sd)β sosd = 0maps to alpha = 0.5. This is the canonical SDF anti-aliasing formulation and restores maximum rim brightness with no other visual side-effect. -
Fix: Eliminated backdrop texture wrap-around artifacts during
LiquidStretchscaling and jelly overshoot. Root cause: Impeller's default texture sampler wrap mode isRepeat. A fragment slightly outsideuGeometrySize(e.g. during a spring overshoot) produced ageometryUVmarginally above 1.0; the sampler wrapped it to near-0.0, sampling the opposite edge of the SDF and producing inverted normals and extreme chromatic aliasing. Resolution: ClampgeometryUVto[0, 1]before the texture fetch. Clamped-edge pixels have near-zero SDF alpha and are discarded by the existinggeometryData.a < 0.01early-out β no separate bounds-check branch required. -
Fix: Eliminated chromatic wrap artifacts during jelly overshoot in
interactive_indicator.frag. Root cause: When the indicator pill overshoots itsRepaintBoundarybounds, out-of-boundstextureBilinearsample points could trigger the same Repeat-mode wrap in the background texture. Resolution: Explicitly clamp all four bilinear sample points to[0, physSize β 1]before thetexture()fetch. -
Fix: Eliminated jagged/pixelated stair-step artifacts on
AnimatedGlassIndicatorpill edges whenindicatorPinchStrength > 0. Root cause:BackdropFilterLayerimplicit samplers are bound toFragmentShaderas Nearest-Neighbor with no Dart API to override it (Flutter Issue #139887). Continuous sub-pixel UV shifts from the lens pinch and chromatic aberration were snapping to integer texels, producing blocky rainbow fringes on high-contrast backgrounds. Resolution: Added atextureBilinearhelper toliquid_glass_final_render.fragthat performs a standard 4-texel bilinear interpolation in GLSL, restoring perfectly smooth sub-pixel background sampling. The geometry texture (uGeometryTexture) is intentionally excluded β its pixel-aligned SDF data must not be softened. -
Fix: Eliminated pixelation on the interactive indicator pill (
GlassSegmentedControl,GlassEffect). Two compounding causes: (1) the background texture was previously captured atpixelRatio: 1.0, so each texel covered a 3Γ3 block of physical pixels on a 3Γ Retina display; (2) Impeller'ssetImageSampler()binding defaults to Nearest-Neighbor, snapping continuous UV offsets from edge refraction to these large texels. Resolution: Background capture now uses the device's full DPR. AtextureBilinearGLSL helper replaces all rawtexture()calls ininteractive_indicator.frag. ~250 KB additional GPU texture memory; sub-0.1 ms additional GPU time per frame β negligible on any modern device. -
Fix: Resolved intermittent Metal API Validation abort on iOS (
GlassQuality.premium) β missing buffer bindings foruWhiten,uWhitenGated, anduPinchStrength(#121). All shader uniforms (slots 0β20) are now written atomically on every paint frame, preventing a stale or zero-initialisedFragmentShadersnapshot from reaching the Metal draw call. Affected:GlassTabBar.bottom(quality: GlassQuality.premium)with an animating indicator. No API changes.
Notes #
- Note (Flutter engine limitation): The
textureBilinearworkaround inliquid_glass_final_render.frag(4-tap bilinear in GLSL) remains necessary for backdrop sampling because Impeller binds the implicitBackdropFilterLayersampler as Nearest-Neighbor with no Dart API to overrideFilterQuality. A Flutter engine feature request to expose sampler filter quality for backdrop layers has been filed at Flutter Issue #188365. Once resolved, the GLSL workaround can be replaced with a singletexture()call.
Chore #
- Chore: Removed unreachable early-out branch in
liquid_glass_final_render.fragβ theif (any(lessThan(geometryUV, ...)))check afterclamp(geometryUV, 0.0, 1.0)could never fire. Replaced with a single consolidated comment explaining how the clamp and the downstream alpha check together handle both the Impeller Repeat-mode and clipExpansion cases. - Chore: Removed dead code from
render.glsl(computeY,getHeight,calculateLighting,calculateRefraction,renderLiquidGlass,debugNormals) β functions superseded by the inline logic inliquid_glass_final_render.frag. Reduces compiled shader binary size.
0.18.1 #
- Hotfix: Resolved missing coverage in layout engines and segmented controls.
- Hotfix: Fixed package analysis warnings due to unused local variables and unnecessary imports in test files.
0.18.0 #
ποΈ Unified Navigation API β iOS 26 Alignment #
This release consolidates the widget API to map 1:1 with Apple's iOS 26 control vocabulary. Two v1-era widgets are deprecated (see Migration below), and GlassTabBar becomes the single source of truth for all tab-navigation work.
β οΈ Breaking Change: Android Bottom Bar Padding #
GlassScaffold now automatically manages the Android system navigation bar padding for bottomBar. If you previously added manual Padding or SafeArea around your bottom bar to prevent it from slipping behind the Android navigation buttons, please remove it to avoid double-padding.
New: GlassTabBar.bottom() β iOS 26 UITabBar equivalent #
Named constructor for bottom navigation bars. Full liquid glass layer, jelly physics pill indicator, MaskingQuality dual-layer icon rendering, and optional dividerSettings.
GlassTabBar.bottom(
tabs: [
GlassTab(icon: Icon(Icons.home), label: 'Home'),
GlassTab(icon: Icon(Icons.search), label: 'Search'),
GlassTab(icon: Icon(Icons.person), label: 'Profile'),
],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
)
New: GlassTabBar.searchable() β UITabBar + morphing search #
Named constructor combining bottom navigation with a morphing glass search pill. Identical API to GlassTabBar.bottom() with additional searchBarConfig and controller parameters.
GlassTabBar.searchable(
tabs: [...],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
searchBarConfig: GlassSearchBarConfig(hintText: 'Search...'),
controller: _tabBarController,
)
New: GlassSegmentedControl β icon support + scrollable mode #
Icon + label support (fixed mode)
segments now accepts List<GlassTab> instead of List<String>. Each segment can render:
- Label only β
GlassTab(label: 'Weekly') - Icon only β
GlassTab(icon: Icon(Icons.photo)) - Icon + label β
GlassTab(icon: Icon(Icons.photo), label: 'Photos')(icon above label)
This matches iOS 26 UISegmentedControl which has supported UIImage segments since early iOS.
Scrollable mode β 100% parity with original GlassTabBar(isScrollable: true)
π¨ Removed: GlassTabBar() inline constructor #
The default GlassTabBar() constructor has been removed. GlassTabBar is now exclusively used for structural bottom navigation (GlassTabBar.bottom() and GlassTabBar.searchable()).
Migration:
For all inline tab bars, pill menus, or scrollable tag lists, use GlassSegmentedControl() or GlassSegmentedControl.scrollable(). They provide 100% feature parity with the old inline GlassTabBar.
- GlassTabBar(
- tabs: const [
- GlassTab(label: 'A'),
- GlassTab(label: 'B'),
- ],
- selectedIndex: _selectedIndex,
- onTabSelected: (i) => setState(() => _selectedIndex = i),
- )
+ GlassSegmentedControl(
+ segments: const [
+ GlassSegment(label: 'A'),
+ GlassSegment(label: 'B'),
+ ],
+ selectedIndex: _selectedIndex,
+ onSegmentSelected: (i) => setState(() => _selectedIndex = i),
+ )
New GlassSegmentedControl.scrollable() named constructor for category filter tabs (6+ items). Internally uses ScrollableSegmentContent β a dedicated widget that owns scrollable pill physics, gesture handling, and 3-layer rendering. Structurally identical to the old inline GlassTabBar(isScrollable: true), now correctly located in the interactive widget family.
// Fixed (UISegmentedControl β equal width, 2β6 items)
GlassSegmentedControl(
segments: const [
GlassSegment(label: 'All'),
GlassSegment(icon: Icon(Icons.photo), label: 'Photos'),
GlassSegment(label: 'Videos'),
],
selectedIndex: _selectedIndex,
onSegmentSelected: (i) => setState(() => _selectedIndex = i),
)
// Scrollable (category filter tabs β natural width, 7+ items)
GlassSegmentedControl.scrollable(
segments: List.generate(12, (i) => GlassSegment(label: 'Category ${i + 1}')),
selectedIndex: _selectedIndex,
onSegmentSelected: (i) => setState(() => _selectedIndex = i),
)
Architecture: Dependency inversion #
All tab-bar layout logic now lives in dedicated layout files:
| File | Owns |
|---|---|
interactive/shared/scrollable_segment_content.dart |
ScrollableSegmentContent β scrollable pill + gesture engine (used by GlassSegmentedControl.scrollable) |
interactive/shared/segmented_control_internal.dart |
SegmentedControlContent β fixed-width pill + gesture engine (used by GlassSegmentedControl) |
surfaces/shared/tab_bar_bottom_layout.dart |
TabBarBottomLayout β full glass bottom shell |
surfaces/shared/tab_bar_searchable_layout.dart |
TabBarSearchableLayout β search morph shell |
GlassTabBar dispatches to these shells. GlassBottomBar and GlassSearchableBottomBar are now zero-logic shims that delegate to the same shells.
Deprecated β removal in v1.0 #
GlassBottomBar β GlassTabBar.bottom()
// BEFORE
GlassBottomBar(
tabs: [GlassBottomBarTab(icon: Icon(Icons.home), label: 'Home')],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
)
// AFTER
GlassTabBar.bottom(
tabs: [GlassTab(icon: Icon(Icons.home), label: 'Home')],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
)
GlassSearchableBottomBar β GlassTabBar.searchable()
// BEFORE
GlassSearchableBottomBar(tabs: [...], ...)
// AFTER
GlassTabBar.searchable(tabs: [...], ...)
GlassTabBar() default constructor β GlassSegmentedControl
// BEFORE
GlassTabBar(
tabs: [GlassTab(label: 'A'), GlassTab(label: 'B')],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
)
// AFTER
GlassSegmentedControl(
segments: [GlassTab(label: 'A'), GlassTab(label: 'B')],
selectedIndex: _selectedIndex,
onSegmentSelected: (i) => setState(() => _selectedIndex = i),
)
GlassSegmentedControl.segments: List<String> β List<GlassTab>
// BEFORE
GlassSegmentedControl(segments: ['Daily', 'Weekly', 'Monthly'], ...)
// AFTER
GlassSegmentedControl(
segments: [
GlassTab(label: 'Daily'),
GlassTab(label: 'Weekly'),
GlassTab(label: 'Monthly'),
],
...
)
iOS 26 control vocabulary β full mapping #
| Widget | iOS 26 equivalent | Glass tier |
|---|---|---|
GlassSegmentedControl(...) |
UISegmentedControl |
Light tint + glass pill |
GlassSegmentedControl.scrollable(...) |
Scrollable filter tabs | Light tint + glass pill |
GlassTabBar.bottom(...) |
UITabBar |
Full liquid glass |
GlassTabBar.searchable(...) |
UITabBar + search |
Full liquid glass |
New: Configurable label colors and indicator border radius for bottom bars #
GlassTabBar.bottom(), GlassTabBar.searchable(), GlassBottomBar, and GlassSearchableBottomBar expose three additional styling parameters:
selectedLabelColorβ tab label colour when selected, independent ofselectedIconColorunselectedLabelColorβ tab label colour when unselected, independent ofunselectedIconColorindicatorBorderRadiusβ pill indicator corner radius, independent ofbarBorderRadius(e.g.100for a fully round pill on a subtly curved bar)
All three are optional; omitting them preserves existing behaviour exactly.
GlassTabBar.bottom(
tabs: [...],
selectedIndex: _selectedIndex,
onTabSelected: (i) => setState(() => _selectedIndex = i),
selectedLabelColor: Colors.blue,
unselectedLabelColor: Colors.grey,
indicatorBorderRadius: 100,
)
0.17.1 #
π Fix β platformViewBackdrop toggle no longer snaps the selected-tab indicator (#112 by @jfhair) #
Toggling platformViewBackdrop at runtime (e.g. switching between a map tab and a Flutter-content tab) caused the selected-indicator pill to snap to the new tab instead of sliding. The spring animation controllers inside the indicator subtree were being re-seeded at their already-settled value because the toggle added or removed the LiquidGlassBlendGroup wrapper in AdaptiveLiquidGlassLayer, changing the child's depth in the element tree and forcing Flutter to discard and re-inflate the whole subtree via initState.
Fix: AdaptiveLiquidGlassLayer is now a StatefulWidget that holds a stable GlobalKey. The child is always wrapped in a KeyedSubtree with that key, so the element identity is preserved across the wrapper toggle β the indicator's AnimationControllers survive and the morph continues correctly.
No API changes. No breaking changes.
0.17.0 #
π¬ iOS 26 Concave Lens Pinch β All Four Pill Widgets #
The indicatorPinchStrength concave lens warp is now unified across all four interactive pill widgets. During a drag the pill edges curve inward (iOS 26 "through a lens" effect). Fully tunable β 0.0 disables it, 1.0 is maximum distortion.
New parameters #
GlassTabBar.indicatorPinchStrength(default0.4)GlassTabBar.indicatorExpansion(defaultEdgeInsets.symmetric(horizontal: 12, vertical: 8))GlassSegmentedControl.indicatorPinchStrength(default0.4)GlassSegmentedControl.indicatorExpansion(defaultEdgeInsets.symmetric(horizontal: 12, vertical: 8))AnimatedGlassIndicatorexported from the public API β enablesbaseIndicatorSettings.copyWith(...)from app code.
Changed defaults (AnimatedGlassIndicator.baseIndicatorSettings) #
glassColor:alpha: 0.15βalpha: 0.0β glass pill no longer applies a white tint overlay by default.chromaticAberration:GlassDefaults.chromaticAberrationβ0.15β the iridescent rim fringe is now explicitly set for iOS 26 parity.
Bug fixes #
GlassSegmentedControlrefraction β labels are now refracted through the glass pill atGlassQuality.premium(was rendered in wrong z-order).GlassTabBarindicator radius β resting pill now inherits the tab bar'sborderRadius(was hardcoded16 px).AnimatedGlassIndicatorsettings merge β partialindicatorSettingsoverrides no longer silently resetchromaticAberration.- Pinch lens jitter at rest β icon and label content no longer shimmers through the lens when the pill settles. Root cause: the jelly spring's micro-oscillations (Β±10 % of
thickness) were directly amplified into the UV warp. Fixed by applying a quadratic ease-out to the pinch multiplier (1 β (1 β fade)Β²), compressing the near-settled oscillation range β10Γ.
Try it β Indicator Parity demo #
The example app includes a live Indicator Parity demo (Demos β Indicator Parity) with all four pill widgets side-by-side and real-time sliders for pinchStrength, indicatorExpansion, and chromaticAberration. Use it to tune parameters before writing any code.
π Apple Dimming Layer β LiquidGlassSettings.backerColor (#111 by @jfhair) #
New optional backerColor on LiquidGlassSettings β a shape-matched color pad composited behind the glass, giving a control's content contrast over rich or colorful backdrops (video, maps, photography) where the glass tint alone can't. This is Apple's "dimming layer" guidance from the Human Interface Guidelines (Materials section) and the pattern behind SwiftUI's clear Glass variant.
LiquidGlassSettings(
glassColor: Color(0x20FFFFFF),
backerColor: Color(0x59000000), // ~35% black β Apple's starting point
)
backerColor(Color?, defaultnull) β the color's alpha is the dimming opacity.nullmeans no backer, so all existing recipes are untouched.- Rendered at the widget level (like
shadow) and clipped to the glass shape viaClipRRect, so it composites correctly even over aPlatformViewβ maps, video β where a shader-side tint cannot reach. - Applies in both light and dark mode, and for flat-edge shapes (a bar over a map is a primary use case).
- Skipped on the grouped path (like shadow) β inserting a
Stackbetween grouped glass and its shared layer would break metaball morphing. lerpfadesbackerColorsmoothly from transparent when one side isnull, rather than snapping at the midpoint.
Migration #
All four widgets share the same tuning API:
indicatorPinchStrength: 0.4,
indicatorExpansion: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
indicatorSettings: AnimatedGlassIndicator.baseIndicatorSettings
.copyWith(chromaticAberration: 0.15),
0.16.3 #
β¨ GlassTintBlend β selectable tint blending path (#107 by @jfhair) #
New GlassTintBlend enum on LiquidGlassSettings to explicitly control how glassColor blends with the refracted backdrop, instead of relying entirely on the chroma heuristic.
GlassTintBlend.autoβ the default. Existing chroma gate, byte-for-byte unchanged behavior.GlassTintBlend.luminosityβ always preserve backdrop luminosity. For near-neutral tints that need to keep the glassy look rather than flattening to a film.GlassTintBlend.flatβ always impose the tint's brightness. For dimming layers, backing scrims, or deliberate frost-film surfaces.
Fully threaded through LiquidGlassSettings (copyWith, lerp, props), both the Premium and Standard shader paths, and preserved through AdaptiveGlass elevation rebuilds. Frosted fallback renders flat by construction and ignores the setting.
β¨ GlassScrollEdgeEffect.bottomFadeInset (#109 by @jfhair) #
New optional bottomFadeInset parameter (default 0.0) that lifts the bottom fade off the widget's true bottom edge by the specified logical pixels. Fixes cases where the scroll viewport extends below the visible area β such as a bottom sheet whose content box overflows past the screen bottom β causing the bottom fade to anchor off-screen and never appear.
No breaking changes. All new parameters are optional with safe defaults.
0.16.2 #
π Bug Fix β GlassMenu / GlassPopover rebuild on keyboard open/close #
GlassMenu and GlassPopover were rebuilding on every keyboard open/close event,
even when closed. Caused by MediaQuery.of(context) in didChangeDependencies
subscribing to viewInsets. Fixed by switching to scoped accessors
(disableAnimationsOf, maybeSizeOf, textScalerOf). Regression tests added.
β¨ Content-luminance scroll-edge scrim (#106 by @jfhair) #
The continuous companion to the contentAwareBrightness discrete lever. Scroll-edge
fades now track content luminance and dissolve toward a dark color as dark content
scrolls under the bars β matching the native App Store early-darkening behaviour.
GlassContentAwareScope.register()gainsonLuminanceChanged(brightness callback is now optional). Per-rect mean luminance is delivered from the existing single capture; deliveries are gated on >0.005 movement.GlassScrollEdgeEffect.contentAwareFadeβ each edge band registers with the scope and lerps towarddarkFadeColoras content darkens (luminanceDarkBelow/luminanceLightAbovethresholds, 280 ms ease-out). Inert without a scope.GlassScaffold.contentAwareEdgeFadeβ one flag to enable both bars, composing withcontentAwareBrightness.- Latent wrap-order fix (0.16.0):
GlassScaffoldwas wrapping the body inGlassContentAwareContentafter the edge fade, so the fade overlays were inside the sampled region. With the adaptive scrim this is a feedback loop. Wrap order corrected + regression test added.
π GlassModalSheet handle-drag fixes (#106) #
- Handle drag no longer fights the inner scroll.
_handleDragActivenotifier is set on pointer-down (before the innerScrollablecan claim slop), disabling inner scroll for the gesture lifetime. Fixes a freeze when dragging the handle over aPlatformView. dragIndicatorColornow actually reaches the drag indicator β it was silently wired into_SheetLayoutbut never forwarded to_GlassDragIndicator.
π GlassEffect β defer capture when boundary is mid-paint (#106) #
toImageSync called during a dirty repaint boundary spammed [GlassEffect] toImageSync failed in debug and dropped the frame's capture. Guarded with debugNeedsPaint check (release-safe, same pattern as GlassScrollEdgeEffect).
No breaking changes. New parameters are all optional with safe defaults β existing code compiles and behaves identically without changes.
0.16.1 #
π iOS 26 Indicator Defaults β Parity Calibration #
Three indicator defaults have been updated across GlassBottomBar and
GlassSearchableBottomBar to better match the iOS 26 bottom-bar pill
out of the box. No API changes β all parameters remain fully configurable.
Changed defaults #
indicatorPinchStrength β 1.0 β 0.4
The previous default of 1.0 applied the maximum concave lens / pinch effect
during drag. iOS 26's actual pinch is more restrained β 0.4 produces the
characteristic "through a lens" look without over-distorting the edges.
To restore the previous behaviour:
GlassBottomBar(
indicatorPinchStrength: 1.0,
...
)
indicatorExpansion β EdgeInsets.all(8) β EdgeInsets.symmetric(horizontal: 12, vertical: 8)
The indicator pill in iOS 26 bottom bars is slightly wider than it is tall β a subtle "landing pad" shape that reads as a rounded rectangle rather than a near-circle. The new default matches this proportion.
To restore the previous behaviour:
GlassBottomBar(
indicatorExpansion: const EdgeInsets.all(8.0),
...
)
AnimatedGlassIndicator chromatic aberration β 0.0 β 0.15
The indicator's internal _baseGlassSettings now sets
chromaticAberration: 0.15. Real iOS 26 glass has a faint iridescent
rainbow fringe at the rim. At 0.15 the effect is a whisper β visible
up close, subliminal during normal use.
To disable the aberration pass a full indicatorSettings override:
GlassBottomBar(
indicatorSettings: LiquidGlassSettings(
chromaticAberration: 0.0,
// include other fields you need
),
...
)
Affected widgets #
GlassBottomBarβindicatorPinchStrengthandindicatorExpansionGlassSearchableBottomBarβindicatorPinchStrengthandindicatorExpansion- All widgets using
AnimatedGlassIndicatorβchromaticAberrationbaseline
GlassTabBar and GlassSegmentedControl retain their existing expansion
defaults (EdgeInsets.all(8.0)) as their geometry is different from a
bottom navigation bar.
0.16.0 #
π¨ Content-Aware Light/Dark Adaptation #
Glass bars now automatically adapt their icon and label colors to match the content scrolling behind them β light glyphs over dark content, dark glyphs over light content β with a smooth cross-fade transition. This matches the iOS 26 behaviour where navigation chrome remains legible regardless of what is visible underneath.
Core engine contributed by @jfhair in PR #103.
New widgets #
GlassContentAwareScopeβ wraps a screen and owns the sampling engine. Captures the content boundary at scroll rate (~5 fps), divides each registered control's rectangle into voting cells, and delivers per-control brightness verdicts via WCAG contrast ratios and dual-threshold hysteresis.GlassContentAwareContentβ marks the sampled content region. Installs aRepaintBoundarythat the scope captures. Controls must be outside this region (e.g. inScaffold.bottomNavigationBarwithextendBody: true).GlassContentAwareBrightnessβ per-control consumer that cross-fades between the light and darkGlassThemeVariantviaGlassThemeVariant.lerp. Supports an externalbrightnessOverride(for PlatformView escape hatches), configurable grid dimensions, and per-control flip duration/curve overrides.
New parameters on existing widgets #
GlassBottomBarβadaptiveBrightness,brightnessOverride,onBrightnessChanged. SetadaptiveBrightness: trueto opt in.GlassSearchableBottomBarβ same three parameters. Both bars automatically wrap inGlassContentAwareBrightnesswhen enabled.GlassScaffoldβcontentAwareBrightness. Whentrue, the scaffold automatically wraps the body inGlassContentAwareContentand the entire layout inGlassContentAwareScope. One flag, no manual widget wiring.
New API surface #
GlassThemeVariant.lerp(a, b, t)β interpolates settings, glow colors, quality, and border radius between two theme variants. Used internally by the cross-fade but available to consumers building custom transitions.GlassThemeSettings.lerp(a, b, t)β interpolates all 9 glass setting fields (thickness, blur, glassColor, lightAngle, lightIntensity, etc.).resolveBarLabelColor(context, brightness)β shared utility for bars to resolve label color fromCupertinoThemegiven an overridden brightness.
Usage #
The recommended path β one flag on GlassScaffold, one on the bar:
GlassScaffold(
contentAwareBrightness: true,
bottomBar: GlassBottomBar(
adaptiveBrightness: true,
onBrightnessChanged: (b) => /* flip your own icon colors */,
tabs: [...],
selectedIndex: _index,
onTabSelected: (i) => setState(() => _index = i),
),
body: CustomScrollView(...),
)
For custom layouts without GlassScaffold, use the standalone widgets directly:
GlassContentAwareScope(
child: Scaffold(
extendBody: true,
body: GlassContentAwareContent(
child: ListView(...),
),
bottomNavigationBar: GlassBottomBar(
adaptiveBrightness: true,
...
),
),
)
Bug fix #
GlassThemeVariant.==/hashCodemissingborderRadiusβ fixed a pre-existing bug where two variants differing only inborderRadiuscompared equal. This caused stale radius during content-aware cross-fades where intermediate lerped variants would not trigger rebuilds.
Polish #
_sample()error reporting β the barecatch (_)in the sampling pipeline now reports toFlutterErrorinside an assert closure. Errors are still suppressed in release builds but surface in debug mode so programming mistakes are visible.- Removed redundant
setStateβ_GlassContentAwareBrightnessState._setBrightnessno longer callssetStatesinceAnimatedBuilderalready listens to the animation controller and rebuilds on every tick.
Example app #
- Content-Aware Brightness demo (new) β dedicated showcase with alternating light and dark content bands that force visible bar flips during scrolling. Available in the Examples tab.
0.15.7 #
π Adaptive Brightness Fix #
Fixed a bug in LightweightLiquidGlass where the shader's internal brightness estimation (backdropLuma) was incorrectly reading from the OS-level MediaQuery.platformBrightnessOf(context) rather than the inherited Flutter Theme.of(context).brightness.
This ensures that glass surfaces now correctly switch to Light Mode parameters (such as the legibility veil) when the app itself overrides the theme to Light Mode, even if the user's physical device remains in Dark Mode.
0.15.6 #
π«οΈ Scroll Edge Fade β Perceptual Gradient Curve #
Replaced the 2-stop linear alpha gradient in GlassScrollEdgeEffect with a
multi-stop eased curve that matches the perceptual dissolve of iOS 26.
- 5-stop gradient profiles for both
softandhardstyles β eliminates the "denser in the centre" banding and the visible seam at the fade boundary. hardstyle reworked: steeper hold β sharper drop curve instead of just compressing the soft profile. Height multiplier relaxed from 0.33Γ to 0.5Γ.- Example app: Nav Patterns demo now fully brightness-aware (adaptive text
colours,
GlassStatusBarStyle.auto, adaptive solid-bar colour).
No API changes. No breaking changes.
0.15.5 #
β¨ Whiten Strength β Light-Mode Legibility Veil #
Opt-in whitening ("legibility veil") lifts glass toward white for legibility over busy light backgrounds β modelling iOS 26's light-mode glass.
-
LiquidGlassSettings.whitenStrength(0.0β1.0, default 0.0): lifts the finished glass toward white as the last step of the render. A single control-wide value with no spatial seams or halo artifacts. -
LiquidGlassSettings.whitenGated(defaulttrue): when gated, the lift scales by per-pixel luminance so bright content lifts to white while dark content (text, icons) stays crisp. Ungated applies the lift uniformly β useful for dark-mode frost effects. -
Consistent across all three quality tiers from one knob: Premium (fragment shader), Standard (tint lerp), and Minimal (frosted fallback) all render the same whitenStrength value consistently.
-
GlassSearchableBottomBarwhiten-at-bottom: when ascrollControlleris provided, the bar animates its whitening toward full white as the page nears the scroll bottom β the iOS light-mode behaviour where content crowding under a bar gets the strongest legibility lift. -
Example app: Buttons & Shadows demo now includes a real-time whiten slider with side-by-side comparison cards and scroll-to-bottom boost preview.
Contributed by @jfhair in PR #100.
π¬ Scale-with-Morph β Cohesive Overlay Content Reveal #
Menu items and popover content now scale in alongside the liquid morph animation instead of popping in at the tail. The glass container and its content feel like a single continuous motion.
- Items enter the tree at 30% morph progress (down from 94%) and scale from
0.5Γ to 1.0Γ via an
easeOutcurve alongside opacity. Text and icons visually grow with the expanding glass container. - Applied to both
GlassMenuandGlassPopoverfor consistent overlay behaviour across the widget family. Content scales in on open and scales back out on close β the morph animation is symmetrical in both directions. - No new API surface. No breaking changes. Purely visual polish.
GlassMenu scale-with-morph contributed by @F1orian in PR #97.
0.15.4 #
β‘ Render Pipeline Performance Pass β FPS & Battery #
Internal optimizations targeting the render object paint() hot path and background
capture lifecycle. Zero API changes, zero visual changes. All 2,050 tests passing.
π― Bottom Bar Lateral Sway #
- Subtle lateral sway on fast pill drags β
GlassBottomBarandGlassSearchableBottomBarnow respond with a near-subliminal horizontal shift when the interactive pill is flicked quickly, matching iOS 26 bottom bar physics. Velocity-gated (slow drags produce no movement) and spring-animated back to center on release.
GPU allocation pressure (FPS) #
- Cached
ImageFilterin_RenderLightweightGlassβ the composed blur+saturationImageFilter(and its 20-elementColorFilter.matrixlist) was previously reconstructed on everypaint()frame for every visible glass widget. With 5 glass cards at 60 fps, that's ~300 list allocations/second hitting the GC. The filter is now cached on the render object and only rebuilt whenblurorsaturationchanges. - Cached
ImageFilterin_RenderInteractiveIndicatorβ same optimization for the interactive indicator shader path (GlassEffect). The brightness+blur composed filter is now cached and invalidated only whenblurSigmachanges. - Cached
ImageFilter.blurinRenderLiquidGlassLayerβ the premium glass layer'sBackdropFilterLayerblur filter was previously recreated on everypaintLiquidGlass()call, even when the blur sigma hadn't changed. During jelly/morph animations (60 fps), this creates anImageFilter.blurobject per frame per premium glass layer. Now cached and reused. - Cached
_shapesWithGeometrylist β the premium glasspaint()method previously allocated a new list on every frame to collect active geometry shapes. It now reuses a cleared instance list, eliminating another per-frame allocation on the hot path. - Cached light angle trigonometry β both
_RenderLightweightGlassand_RenderInteractiveIndicatornow cachecos(lightAngle)and-sin(lightAngle)instead of recomputing them on every_updateShaderUniforms()call. Matches the caching pattern already used by the premiumLiquidGlassRenderObject._cachedLightDir. - Conditional
alwaysNeedsCompositingβ both_RenderLightweightGlassand_RenderInteractiveIndicatorpreviously returnedtrueunconditionally, forcing the framework to create a compositing layer even in the fallback path (null shader or zero blur). Now returnstrueonly when aBackdropFilterLayerwill actually be pushed. Reduces layer tree depth on low-end devices.
Battery life #
- Background Ticker auto-suspend β
LightweightLiquidGlassruns a Ticker to capture the background behind each glass widget viatoImageSync. Previously, this ticker ran at 60 fps permanently β even when the background hadn't changed for minutes (e.g. a static bottom bar over a static page). After 3 consecutive no-change frames (~50 ms), the ticker now self-suspends. It restarts automatically whendidUpdateWidgetdetects a configuration change. For a bottom bar with 5 tab pills, this eliminates 300 unnecessary method calls/second while idle.
GC pressure on frame timing path #
- Optimised
GlassQualityAdapter._percentileβ the Phase 3 runtime percentile computation previously called_window.toList()+List.from(data)..sort()every 120 frames, creating two heap-allocated lists on the frame timing callback path. Now reuses a pre-allocated sort buffer (List<int>.filled) that is overwritten in-place. Eliminates GC pressure from the very code path that monitors for GC-induced frame drops.
Community contribution #
- Collapsed search indicator stretch feedback β the collapsed indicator in
GlassSearchableBottomBarnow wraps inLiquidStretch, giving it the same press-scale physics as the normal tab indicator. Contributed by @g3mf0r in PR #96.
Widget tree rebuild reduction #
- Shared spring listener in
GlassSearchableBottomBarβ the three morph- animationAnimationControllers (tab width, search left, search width) each had their own anonymousaddListener(() => setState(() {}))callback. During a pill morph all three springs tick every frame, producing three independentsetStatecalls per frame. Now all three share a single named_onSpringTickcallback β Flutter coalesces the dirty mark so only one rebuild fires. Also fixes a subtle listener leak: anonymous lambdas can't be matched byremoveListener, but named methods can.
Consistency fix #
GlassEffect.preWarm()dummy image β changed from asyncawait picture.toImage(1, 1)to synchronouspicture.toImageSync(1, 1), matching theLightweightLiquidGlasspattern. Eliminates a 1-frame async initialization delay for a 1Γ1 transparent texture. Addedpicture.dispose()to prevent a minor leak.
0.15.3 #
platformViewBackdrop β Premium Glass Over iOS PlatformViews #
New opt-in flag that lets glass bars render correctly over native iOS views
(Google Maps, Apple Maps, WebView, MapLibre, video players) while keeping the
premium indicator animations alive. Previously, developers had to downgrade to
GlassQuality.standard on iOS β now they can stay on premium.
Contributed by @jfhair in PR #94.
New parameter: platformViewBackdrop #
GlassBottomBarβ newplatformViewBackdropparameter. Whentrue, the bar background renders via liveBackdropFilter(the premium shader'stoImageSynccannot capture aUIKitView), while the premium indicator refracts the bar's own icon layer instead of the un-capturable backdrop.GlassSearchableBottomBarβ same parameter, applied to both the tab indicator and the search pill. The collapsed search button automatically falls back toGlassQuality.standardover a PlatformView.AdaptiveGlass/AdaptiveGlass.grouped()β newplatformViewBackdropparameter that forces theBackdropFilterrendering path even atGlassQuality.premium.AdaptiveLiquidGlassLayerβ newplatformViewBackdropparameter that skips theLiquidGlassBlendGroupwrapper when rendering over a PlatformView.
Usage #
GlassBottomBar(
quality: GlassQuality.premium,
platformViewBackdrop: Platform.isIOS, // β one line fix
tabs: myTabs,
selectedIndex: _index,
onTabSelected: (i) => setState(() => _index = i),
)
Example app #
- Google Maps demo β updated to use
platformViewBackdrop: Platform.isIOSinstead of the oldPlatform.isIOS ? GlassQuality.standard : GlassQuality.premiumworkaround. The bar now stays atGlassQuality.premiumon all platforms.
0.15.2 #
GPU SDF Shadows β Light Mode Performance & Metaball Support #
Replaced the previous inverse-clip shadow system with GPU SDF shadows that render
directly from the merged geometry matte. This is both a performance improvement
and a visual correctness fix β shadows now correctly follow the liquid metaball
shape during morph animations, which was impossible with the old per-element
ClipPath approach.
Light mode shadows #
- GPU SDF shadow pass β
RenderLiquidGlassLayer.paintGlassnow includes a Pass 0 that draws eachBoxShadowusing the geometry matte image. The matte is drawn withImageFilter.blurfor the shadow spread, tinted viaColorFilter.mode, and then the interior is punched out withBlendMode.dstOutso the glass backdrop filter never samples its own shadow. This replaces the widget-level_InversePillClipper/_InverseOvalClipperClipPathapproach. - Shadows plumbed through the full stack β
LiquidGlassSettings.effectiveShadowis now resolved at theAdaptiveGlassandAdaptiveLiquidGlassLayerlevel and passed throughLiquidGlass.withOwnLayerβLiquidGlassLayerβ_RawShapesβRenderLiquidGlassLayer. Dark mode and flat-edge shapes (borderRadius: 0) correctly receive an empty shadow list. - Removed old clip-based shadow system β deleted
_InversePillClipper,_InverseOvalClipperfromGlassBottomBar, and the equivalent clippers fromGlassSearchableBottomBar. Removed_wrapWithLightModeShadowfromAdaptiveGlass. This eliminates ~140 lines of widget-level shadow plumbing and the associatedClipPathcompositing cost. - Geometry image exposed to subclasses β
LiquidGlassRenderObjectnow exposesgeometryImageandgeometryLocalBoundsas@protectedgetters soRenderLiquidGlassLayercan access the matte for shadow rendering.
GlassMenu overlay rendering #
AdaptiveLiquidGlassLayerin menu overlay β the morph overlay now usesAdaptiveLiquidGlassLayerinstead of rawLiquidGlassLayer, ensuring correct quality resolution and backdrop blur when the menu is rendered in premium mode.
Example app #
- Buttons & Shadows demo β locked to Light Mode (
Brightness.light) to serve as the definitive showcase for GPU SDF shadows. Moved from the Demos tab to the Examples tab with updated card gradient and subtitle. - Apple Messages demo β menu trigger buttons now use
useOwnLayer: trueto correctly enter the GPU SDF shadow pipeline. Menu glass settings are brightness-aware (Colors.white12dark /Color(0x99FFFFFF)light). - Surfaces demo β
_buildDemoBackground()now acceptsBuildContextand returns a light frosted gradient in Light Mode instead of the hardcoded dark navy gradient that caused unreadable text.
Bug fixes #
- Fixed unused import
snap_rect_to_pixels.dartinliquid_glass_layer.dart. - Fixed unused
isDarkvariable inglass_menu_internal.dart. - Removed unnecessary
package:flutter/material.dartimport fromadaptive_liquid_glass_layer.dart(already provided bycupertino.dart). - Fixed duplicate doc comment in
glass_bottom_bar.dart. - Fixed release-mode crash in
GlassScrollEdgeEffect._captureBackgroundβRenderRepaintBoundary.toImage()throws synchronously onlayer!when called before the first paint completes (layer not yet composited). ThedebugNeedsPaintguard only runs insideassert()and is stripped in release builds. Fixed by deferring the initial capture to a post-frame callback and wrappingtoImage()intry/catchas a safety net. Falls back to the solid-colour gradient overlay on failure. (reported by @RuslanTsitser via #93) - Updated
GlassBottomBargolden test reference image.
0.15.1 #
Full Light & Dark Mode β Complete Adaptive UI Kit #
liquid_glass_widgets is now a fully adaptive iOS 26 UI kit. Every widget
β buttons, menus, search bars, sliders, switches, sheets, toasts, chips, form
fields, and all surface bars β automatically resolves the correct glass color,
rim lighting, shadow, text, and icon values for both Light and Dark
mode. No manual configuration required.
This release closes the last remaining light-mode rendering gaps and ships a reference implementation in the Apple Messages demo that matches the iOS 26 Messages app in both modes. Run the example app to toggle light and dark mode for all demo pages.
New features #
- Configurable glass shadow β
LiquidGlassSettings.shadowElevationscales the light-mode drop shadow (0.0= off,1.0= default,2.0= double).LiquidGlassSettings.shadowaccepts a customList<BoxShadow>for full control. Both flow throughglobalSettings(theme-level) and per-widgetsettings:. GlassShadowconstants β centralised shadow values (GlassShadow.elevation,.contact,.defaults,.scaled(double)) exported for custom widget authors.GlassButtonGroup.icons()β introduced a lightweight group constructor for iOS 26 style segmented icon toolbars. Uses a singleGlassButtonparent to drive cohesive group-level stretch/glow interaction, while children are rendered as zero-overhead stateless tap targets.GlassMenuControllerβ imperative controller forGlassMenuwithopen(),close(), andisOpen. Drives the menu programmatically instead of (or in addition to) tapping the trigger β useful for gesture-arena-driven menus. (contributed by @F1orian)GlassMenu.showDismissBarrierβ whenfalse, suppresses the full-screen tap-to-dismiss barrier so an external gesture owner can keep receiving pointer events while the menu is open. Defaults totrue. (contributed by @F1orian)GlassMenu.morphFromZeroβ whentrue, the menu body lerps from a zero-size point at the trigger center instead of from the trigger's own dimensions, suppressing the spawn blob (Blob A). For invisible or zero-sized triggers. (contributed by @F1orian)GlassMenuController.setFollowOffset(Offset)β nudges the open menu to track a moving anchor in real-time. The offset is added to the captured trigger position each frame and reset on the nextopen(). (contributed by @F1orian)
Light & dark mode improvements #
- Complete adaptive rendering β all widgets now resolve glass color, rim borders, shadows, text, and icon colors from
CupertinoTheme.brightnessOf(context). Switching between light and dark mode requires zero widget-level changes. - Light-mode rim borders β removed the heavy dark rim border on glass surfaces in light mode. Dark mode rim lighting remains fully intact and unchanged.
- Light-mode drop shadows β added inverse-clipped drop shadows to glass surfaces in light mode (cards, standalone buttons, bottom bars). Shadows render outside the glass boundary so the backdrop filter doesn't blur them. Note: morphing elements like the search pill do not have shadows to prevent animation artifacts.
- Standard glass white frost β standard quality glass in light mode now correctly renders as clean frosted white instead of muddy grey.
- Dynamic color resolution β improved internal text and icon styling to accurately resolve
CupertinoColorsagainst the active theme brightness. GlassSearchBarandGlassTextFielddefault colors now brightness-aware β default text, icon, and glow colors now resolve dynamically againstCupertinoTheme.brightnessOf(context)instead of being hardcoded to white. This ensures correct contrast in both light and dark mode.
Bug fixes #
- Fixed missing
} else {inlightweight_glass.fragthat caused PATH B (standard widgets) to run inside PATH A. - Fixed
GlassSheetsharp corners on macOS by decoupling top and bottom border radius. - Fixed
GlassMenuselection pill alignment and hit-test accuracy when system text scaler is active. - Fixed
GlassChipresolving with invisible white text and icons in light mode. - Fixed Apple Podcasts demo incorrectly forcing dark-mode glass colors in light mode.
- Fixed
GlassFormFieldlabel (Colors.white) and helper text (Color(0x99FFFFFF)) being invisible in light mode β now resolves fromCupertinoColors.label/.secondaryLabel - Fixed
GlassPickervalue text (Colors.white) and chevron icon (Colors.white70) being invisible in light mode β now resolves fromCupertinoColors.label/.secondaryLabel. - Fixed
GlassPasswordFieldlock and eye toggle icons (Colors.white70) being invisible in light mode β now resolves fromCupertinoColors.secondaryLabel. - Fixed
GlassActionSheetforcing dark card background (Colors.black @ 0.65), dividers, and pressed highlights regardless of brightness β now resolves to light frosted glass in light mode. - Fixed
GlassToastforcing dark pill (Colors.black @ 0.7) and white text regardless of brightness β background and text now resolve from brightness for correct contrast in both modes. - Removed unnecessary
import 'package:flutter/material.dart'fromGlassFormField,GlassPicker,GlassPasswordField, andGlassToast. - Fixed
GlassMenumorph size going negative during spring undershoot on small triggers βcurrentWidth/currentHeightnow clamped to>= 0to prevent debugBoxConstraintsassertion. (contributed by @F1orian) - Fixed
GlassMenusub-pixel Impeller crash β body container is replaced withSizedBox.shrink()when dimensions fall below 1.0 logical pixel, preventing 0-area matte rasterisation. (contributed by @F1orian) - Fixed
GlassIconButtonbypassing theme quality chain βqualitynow passesnullthrough toGlassButton.custom()soGlassThemeHelpers.resolveQualitycan resolve from ancestor layers, theme, then widget default. (contributed by @F1orian)
β οΈ Breaking β Removed frosted well overlay from GlassTextField #
GlassTextField no longer applies a hidden internal darkening overlay ("frosted well") on top of the glass surface. Previously, a DecoratedBox with Colors.black.withValues(alpha: 0.12) plus a top-edge gradient was composited inside the glass shape to simulate an iOS 26 recessed input tray. This has been removed entirely.
Why: The frosted well fought against user-specified glassColor, making text fields appear darker/muddier than buttons with identical settings. It also caused visible nested border artifacts when the overlay's BorderRadius.circular() didn't match the glass surface's LiquidRoundedSuperellipse shape β especially with useOwnLayer: true and padding: EdgeInsets.zero.
Design philosophy: GlassTextField is a hero surface (search bars, compose bars, app bar inputs) β not a form field nested inside glass cards. glassColor is now the single source of truth for appearance, consistent with every other glass widget.
Migration: If you relied on the frosted well for visual distinction inside a grouped layout, set a slightly darker glassColor on the text field explicitly. Most users will see cleaner, more predictable text fields with no action required.
Example app #
- Input demos β replaced
GlassCardwrappers around form fields with flatCupertinoColors.systemFillcontainers. Glass text fields now render as standalone hero surfaces (useOwnLayer: true) inside flat-colored form sections, demonstrating the correct pattern. Glass-in-glass nesting is an anti-pattern. - Apple Messages demo β fully adaptive light and dark mode implementation. Light mode uses the iOS system grouped background (
#F2F2F7), brightness-aware white glass tint, and dynamic layer separation to enable shadows. Dark mode retains liquid blending via the sharedAdaptiveLiquidGlassLayer. Press interactions usepersistPressOnDrag: trueand an elevatedambientBaseLightin light mode so the pressed state remains visible while holding and dragging off the button edge.
0.15.0 #
β οΈ Breaking β API Cleanup & Standardisation #
Removes Material-leaning widgets and thin wrappers that don't map to real
iOS 26 components. Standardises the public API for v1.0 readiness. This is a
breaking release β users on ^0.14.0 will not auto-upgrade.
Deleted widgets #
| Widget | Migration |
|---|---|
GlassPanel |
Replace with GlassCard(padding: EdgeInsets.all(24)) |
GlassWizard / GlassWizardStep |
No direct replacement β use GlassStepper for sequential steps |
GlassSideBar / GlassSideBarItem |
No direct replacement β a proper UISplitViewController-style sidebar is planned for post-1.0 |
GlassSnackBar |
Replace with GlassToast (identical API β GlassSnackBar was documented as an alias) |
glassSettings β settings rename #
The glassSettings parameter on 8 widgets has been renamed to settings for
consistency. The Glass prefix on the widget name already identifies the
settings type β glassSettings was redundant.
Affected widgets: GlassBottomBar, GlassSearchableBottomBar,
GlassSegmentedControl, GlassButtonGroup, GlassMenu, GlassPopover,
GlassToolbar, GlassPicker.
Migration: Find-and-replace glassSettings: β settings: in your code.
GlassSheet.show() API Cleanup #
Removed dead Material parameters from GlassSheet.show() that have no effect in the liquid glass rendering pipeline:
backgroundColorelevationshapeclipBehaviorconstraints
Migration: Remove these parameters from your GlassSheet.show() calls. Use settings to configure the glass visual appearance, and margin / padding / borderRadius to control the layout and shape.
π¨ Content Colour Audit β Adaptive Light/Dark Mode #
All hardcoded Colors.white / Colors.black in widget content layers replaced with CupertinoColors adaptive equivalents. Widgets now render correctly in both light and dark mode without requiring a MaterialApp ancestor.
Affected widgets: GlassDialog, GlassActionSheet, all interactive and surface widgets.
GlassPage is now fully safe to use inside a pure CupertinoApp β the Theme.of guard no longer throws when no Material ancestor is present.
π Bug Fixes #
GlassSheet sharp corners (All Platforms) #
Fixed a bug where GlassSheet would render with completely sharp, square corners on all devices (including iOS and Android). The internal SafeArea wrapper was consuming the bottom safe area before the adaptive radius calculation could read it, causing it to incorrectly fallback to 0.0 everywhere. GlassSheet now decouples its top and bottom border radii, defaulting to topBorderRadius: 32.0, and smartly assigning bottomBorderRadius to 32.0 when floating (with margin) or 0.0 when docked.
β¨ New β GlassButtonStyle.prominent #
A new button style matching iOS 26's .prominentGlass / .glassProminent
configuration β thicker, more opaque glass for primary call-to-action buttons.
GlassButton(
style: GlassButtonStyle.prominent,
icon: Icon(CupertinoIcons.plus),
onTap: () {},
)
β¨ New β GlassGroupedSection #
A convenience wrapper that groups GlassListTiles inside a GlassCard,
automatically applying isLast: true to the final tile to suppress its
bottom divider β the most common source of bugs.
GlassGroupedSection(
header: Text('Network'),
children: [
GlassListTile(title: Text('Wi-Fi')),
GlassListTile(title: Text('Bluetooth')),
GlassListTile(title: Text('VPN')), // isLast applied automatically
],
)
β¨ New β GlassPageControl #
iOS UIPageControl equivalent β dot indicators for paged content (carousels,
onboarding, gallery pages). Features animated capsule-shaped active dot with
glass treatment and optional tap-to-navigate.
GlassPageControl(
count: 5,
currentPage: _currentPage,
onPageChanged: (page) => _pageController.animateToPage(page,
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut,
),
)
π README β Glass vs Content design guide #
Added a design philosophy section explaining iOS 26's glass hierarchy:
glass for navigation chrome and controls, opaque for content areas.
Repositioned GlassContainer as an advanced primitive in the widget catalogue.
What stays #
GlassBackdropScopeβ deprecated no-op stays until 1.0.0 as previously committed in the 0.14.0 changelog. Zero cost to keep.- All other widgets β no changes.
π Fix β GlassMenu auto-scrolling with large system text #
When the user increased system text size, GlassMenu would become scrollable
even without menuHeight being set. The height calculation now accounts for
textScaler so the menu sizes correctly at any accessibility text scale.
π Fix β GlassMenu selection pill misalignment at large text scale #
The sliding selection highlight and hit-test math used the nominal 44px item
height for positioning, while the actual GlassMenuItem widgets grew taller
via ConstrainedBox when system text was scaled up. This caused the pill to
drift out of alignment and sometimes produce a "double highlight" effect. All
layout math (_getItemOffset, _calculateIndexFromPosition, _isScrollable)
now uses the TextScaler-aware height calculation.
π Fix β GlassMenuItem / GlassMenuDivider / GlassMenuLabel Light Mode #
These widgets previously hardcoded Colors.white for text, icons, and divider
colours, making them invisible on light backgrounds. They now inherit from
CupertinoTheme.of(context):
| Widget | Colour Source |
|---|---|
GlassMenuItem |
theme.textTheme.textStyle.color β CupertinoColors.label |
GlassMenuDivider |
theme.textTheme.tabLabelTextStyle.color at 15 % opacity |
GlassMenuLabel |
theme.textTheme.tabLabelTextStyle.color at 45 % opacity |
Custom iconColor, titleStyle, and color parameters still take priority
over the theme default β zero breaking changes.
π§Ή Core β CupertinoApp compatibility #
Removed all Theme.of(context) dependencies from the core library, replacing them with CupertinoTheme and defaultTargetPlatform. This ensures glass widgets adapt correctly to dark mode and background colours in pure CupertinoApp structures without falling back to Material defaults.
π§Ή Example app β CupertinoApp migration #
All 16 standalone demos and the main showcase app have been migrated from
MaterialApp to CupertinoApp. This is the correct root widget for an iOS 26
glass library β it provides CupertinoTheme to the entire widget tree, which
glass widgets depend on for colour resolution.
A Theme(data: ThemeData.dark(...)) builder is injected below CupertinoApp
so that any Scaffold widgets in demo pages continue to receive proper Material
theming (background colour, text defaults).
π§Ή Example app β GlassMenu demo controls #
Added text-scale slider (1.0Γβ3.0Γ) and light/dark theme toggle to the menu
demo. Also added GlassMenuLabel, GlassMenuDivider, and a destructive
GlassMenuItem to the menu items so their theme colour inheritance can be
visually verified.
0.14.2 #
π§Ή Material Artifact Purge #
Replaced internal Material primitives with Cupertino-native equivalents for better iOS 26 fidelity. No public API changes.
- Tap feedback:
InkWellβGestureDetector+ iOS-style opacity highlight inGlassListTileandGlassActionSheet. - Icons:
Icons.chevron_right,Icons.add,Icons.remove,Icons.info_outlineβCupertinoIconsequivalents inGlassListTileandGlassStepper. - Colours: Hardcoded
Colors.green/Colors.redβCupertinoColors.systemGreen/CupertinoColors.destructiveRedacrossGlassSwitch,GlassBadge,GlassWizard,GlassDialog,GlassMenuItem, andGlassFormField.
0.14.1 #
π Fixed β GlassScaffold black background #
GlassScaffold with no background: widget was forcing the inner Scaffold to
Colors.transparent, rendering black instead of Theme.scaffoldBackgroundColor.
Added a backgroundColor: Color? parameter; the scaffold now defaults to the
theme colour when no explicit background is provided.
β¨ Improved β Cancel icon size & customisation #
The dismiss Γ button in GlassSearchableBottomBar was hardcoded to size: 16,
which felt undersized compared to iOS 26. Default bumped to 24. Both
GlassSearchBar and GlassSearchBarConfig now expose cancelIconSize and
cancelIcon so the icon size and glyph are fully overridable.
β¨ New β GlassPopover #
A new overlay widget that presents custom content in a glass container with
the same liquid morph animation as GlassMenu. Use it for tooltips, mini forms,
preview cards, colour pickers, or any content that should appear in a glass
popover β without being limited to a list of menu items.
GlassPopover shares GlassMenu's liquid teardrop expansion, spring physics,
auto-positioning, and screen-edge clamping. The contentBuilder receives a
close callback so popover content can dismiss itself.
GlassPopover(
trigger: GlassIconButton(
icon: Icon(CupertinoIcons.info_circle),
onPressed: null, // handled by GlassPopover
),
contentBuilder: (context, close) => Padding(
padding: EdgeInsets.all(16),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text('Profile Details',
style: TextStyle(color: Colors.white, fontSize: 16)),
SizedBox(height: 12),
GlassButton(onTap: close, child: Text('Done')),
],
),
),
)
Key parameters:
contentBuilderβ builder for custom popover content, receives aclosecallbacktrigger/triggerBuilderβ the widget that opens the popover on tappopoverWidth/popoverHeightβ size control (height defaults to intrinsic)alignmentβ manualGlassMenuAlignment, ornullfor auto-detectautoAdjustToScreenβ screen-edge clamping (on by default, with 12px padding)barrierDismissibleβ whether tapping outside closes the popover (default: true)onOpen/onCloseβ lifecycle callbacks- Full
LiquidStretchandGlassGlowsupport
0.14.0 #
β οΈ Breaking β GlassAppBar redesigned as pure layout widget #
GlassAppBar has been fundamentally redesigned from a StatefulWidget with its own glass rendering to a lightweight StatelessWidget that serves purely as a layout container. This matches iOS 26's actual navigation bar pattern where the bar itself is transparent and glass effects belong on individual interactive elements.
Removed parameters:
settingsβ glass surface settings (the bar no longer renders glass)qualityβ glass quality selectoruseOwnLayerβ layer isolation controlscrollControllerβ scroll-driven glass transitionscrollEdgeThresholdβ scroll fade threshold
New parameter:
buttonSettings: LiquidGlassSettings?β provides default glass settings to all descendantGlassButtonwidgets viaDefaultButtonSettings(a newInheritedWidget). Individual buttons can still override with their ownsettings.
Migration:
// Before (0.13.x) β scroll-driven glass bar:
GlassAppBar(
title: Text('Title'),
scrollController: _ctrl,
scrollEdgeThreshold: 50.0,
settings: LiquidGlassSettings(blur: 15),
quality: GlassQuality.premium,
)
// After (0.14.0) β transparent layout bar:
GlassAppBar(
title: Text('Title'),
buttonSettings: LiquidGlassSettings(
glassColor: Color(0x33FFFFFF),
thickness: 20,
),
)
// Use GlassScaffold.header + headerScrollController for fading headers.
Apps that relied on GlassAppBar.scrollController for scroll-driven glass should migrate to GlassScaffold with its header / headerScrollController parameters (see below).
β¨ New β GlassScaffold β one-widget page layout #
A brand new scaffold that replaces the manual assembly of GlassPage + Scaffold + GlassScrollEdgeEffect + Stack with a single widget. Handles z-ordering (bars always above body), edge fading, safe-area padding, and glass layer setup automatically.
header + headerScrollController + headerFadeDistance #
A fixed header widget positioned below the status bar that fades out as the user scrolls β matching the iOS 26 large-title pattern used by Apple Music ("Listen Now"), Apple Podcasts, and similar apps.
GlassScaffold(
header: Text('Listen Now', style: largeTitle),
headerScrollController: _scrollController,
headerFadeDistance: 60.0,
body: CustomScrollView(
controller: _scrollController,
slivers: [...],
),
)
The header is wrapped in IgnorePointer only when fully faded (opacity == 0), so tappable elements remain interactive at full visibility.
bodyOverlays #
Optional list of widgets rendered between the body and the navigation bars in z-order. Designed for floating elements like Apple Music's play-bar pill that need to render above scrollable content but below the bottom bar.
GlassScaffold(
bodyOverlays: [
AnimatedPositioned(
bottom: isMiniMode ? miniBottom : aboveBarBottom,
left: 20, right: 20,
child: PlayBarPill(),
),
],
body: scrollContent,
)
AnnotatedRegion status bar fix #
GlassScaffold now wraps the internal Scaffold in an AnnotatedRegion<SystemUiOverlayStyle> so that the statusBarStyle setting correctly overrides CupertinoPageRoute's own region. Previously, pages without a GlassAppBar could lose their status bar icon styling when pushed via CupertinoPageRoute.
Improved isolation strategy #
GlassScaffold now wraps app bar and bottom bar in GlassIsolationScope(isolated: false, defaultQuality: GlassQuality.premium) instead of the previous GlassIsolationScope(isolated: true). This means bar buttons join the page-level glass blend group (shared backdrop capture) rather than creating their own layers β saving GPU cost. Stack paint order already guarantees bars render on top of body content.
Stable ValueKeys on stack children #
All conditional children (header, app bar, bottom bar) now have explicit ValueKeys so Flutter tracks them by identity rather than position. This prevents unmount/remount cycles (and loss of animation state) when toggling the header on and off.
See
example/lib/demos/nav_bar_patterns_demo.dartfor completeGlassScaffoldusage patterns.
β¨ New β GlassIsolationScope.defaultQuality #
GlassIsolationScope gains a defaultQuality: GlassQuality? parameter that provides a quality hint for descendants without requiring explicit quality: on each widget. This is separate from isolated β a scope can be de-isolated (for grouping) while still providing a premium quality default.
GlassThemeHelpers.resolveQuality now checks scopeDefault and skips inherited page-level quality when a scope provides a defaultQuality. This fixes a regression where bar buttons inside GlassScaffold would inherit the page's standard quality instead of getting the bar's intended premium.
β¨ New β DefaultButtonSettings InheritedWidget #
A new InheritedWidget in glass_app_bar.dart that provides default LiquidGlassSettings to descendant GlassButton widgets. GlassButton now checks DefaultButtonSettings.of(context) as a fallback between explicit settings and inherited layer settings.
β¨ New β AdaptiveGlass interactive auto-promotion #
AdaptiveGlass now automatically promotes interactive elements (isInteractive: true) to their own compositing layer in premium mode. This gives buttons the prominent independent refraction that matches iOS 26's button design, rather than softly blending them into the page blend group. The own-layer wrapper de-isolates children via GlassIsolationScope(isolated: false) so nested glass (e.g. tab items inside a bottom bar) groups correctly with the button's layer.
π Fix β GlassBottomBar extra button z-order #
Fixed a compositing z-order issue where the jelly tab indicator would incorrectly render behind the extra trailing button. The internal layout has been restructured from a Row to a Stack with explicit paint ordering β the extra button is painted first (bottom of z-order), and the tab indicator is painted last (top). This matches the existing pattern in GlassSearchableBottomBar.
π Fix β GlassSearchableBottomBar pill z-order #
Fixed the paint order of the search pill and tab pill in GlassSearchableBottomBar. The search pill is now painted first (bottom of stack) and the tab pill last (top), so the glass indicator correctly renders on top when it overlaps the search pill during tab transitions.
π Fix β mounted guards in gesture handlers #
Added if (mounted) guards before every setState() call in TabDragGestureMixin, TabIndicator, and SearchableTabIndicator. Pointer events (onPointerDown, onPointerUp, onPointerCancel) and drag gesture callbacks can fire after the widget has been unmounted during rapid tab switching or page transitions, causing setState() called on disposed widget exceptions in debug mode. These guards are zero-cost safety nets.
π Changed β Nav bar patterns demo #
Removed three GlassAppBar demo patterns that used the now-deleted scroll-driven glass API:
Scroll-Driven Glass(transparent β glass on scroll)Static Glass(always-on glass surface)Large Title Glass on Scroll(combined collapsing + glass materialisation)
Added a new "Fade Header (No App Bar)" pattern demonstrating the GlassScaffold.header fade approach (Apple Music / Podcasts style).
π Changed β Example app restructured #
Showcase app uses GlassScaffold #
The main showcase app (main.dart) now uses GlassScaffold instead of manually composing GlassPage + Scaffold + bottomNavigationBar. Added a fourth tab ("Examples") and redesigned the Widgets tab with a 2-column card grid.
Apple demos migrated to GlassScaffold #
All four Apple demo apps have been migrated from manual Scaffold + Stack + GlassScrollEdgeEffect composition to GlassScaffold:
- Apple Messages β
GlassScaffoldhandles positioning, z-ordering, and edge fading automatically. 8 lines changed. - Apple Music β uses
GlassScaffold.headerfor the "Listen Now" fade header,bodyOverlaysfor the floating play pill. Major simplification (294 lines changed). - Apple News β migrated to
GlassScaffold. Removed unnecessary nestedStack. 57 lines changed. - Apple Podcasts β uses
GlassScaffold.bodyOverlaysfor the mini-player pill. 372 lines changed.
Category pages re-indented #
All 6 showcase category pages (containers, feedback, input, interactive, overlays, surfaces) have been re-indented for consistency. No functional changes.
π Fix β Impeller backdrop visual corruption #
Fixed a critical rendering issue where GlassAppBar buttons would lose their glass background (rendering as invisible) when multiple LiquidGlassLayers shared a single root BackdropGroup (via GlassBackdropScope). On Impeller, sharing a BackdropKey across multiple RepaintBoundary layers caused the engine to bind stale or incorrect backdrop textures.
Root cause: The shared BackdropGroup architecture assumed that all glass surfaces could safely share a single GPU backdrop capture. On Impeller's tile-based renderer, this created a race between layers trying to use the same BackdropKey, causing visual corruption (backgrounds vanishing, ghost artifacts during route transitions).
Fix: Each LiquidGlassLayer now creates its own isolated BackdropGroup β RepaintBoundary subtree. This ensures every glass surface captures only its own clipped bounding box β a ~30Γ reduction in GPU bandwidth compared to the previous full-screen capture, and eliminates cross-layer texture conflicts entirely.
β οΈ Deprecated β GlassBackdropScope #
GlassBackdropScope is now a no-op and can be safely removed from your widget tree. Each glass layer manages its own backdrop isolation automatically. GlassPage continues to work exactly as before β no migration needed for apps using GlassPage.
Apps using GlassBackdropScope directly will see a deprecation warning but will compile and run without issues. Remove the widget at your convenience; it will be deleted in 1.0.0.
π Changed β GlassInteractionSettings is now the canonical interaction API #
GlassInteractionSettings (introduced in 0.13.0) is now the recommended way to configure all interaction physics app-wide. Pass it via GlassThemeData.interaction inside LiquidGlassWidgets.wrap():
runApp(LiquidGlassWidgets.wrap(
child: const MyApp(),
theme: GlassThemeData(
interaction: GlassInteractionSettings(
stretch: 0.2, // subtler drag-following globally
interactionScale: 1.03, // less scale-up on press
resistance: 0.01, // drag damping factor
anchorStretch: true, // iOS 26 rubber-band from anchor
anchorStretchSettings: AnchorStretchSettings(
intensity: 0.8,
squashFactor: 0.15,
),
),
),
));
Set stretch: 0.0 to disable drag-following app-wide while keeping press-scale. Individual widgets can still override any value via their own stretch: / interactionScale: parameters.
0.13.0 #
β¨ New β Anchor Stretch, Ambient Light, and Interaction Physics #
AnchorStretchSettings β fine-tuned stretch feel #
A new configuration class for LiquidStretch that controls how widgets deform when pressed and dragged. Widgets now stretch from their anchor point toward the drag direction β matching iOS 26 button physics where the surface rubber-bands from its resting position rather than free-following the finger.
GlassButton(
anchorStretchSettings: AnchorStretchSettings(
intensity: 0.8, // more stretchy
squashFactor: 0.3, // perpendicular compression
translationDamping: 0.15, // center-shift toward finger
bounciness: 0.2, // elastic snap-back overshoot
),
)
All parameters have sensible defaults matching iOS 26 behaviour. Most developers won't need to change them.
GlassButton.ambientBaseLight β surface luminosity #
A subtle white overlay (default 0.08) applied during press/drag interactions. Simulates iOS 26 surface luminosity β when the directional glow tracks off-edge, the button still maintains a faint lit appearance rather than going completely dark.
GlassButton.persistPressOnDrag #
Controls whether the pressed visual state persists when the user's finger drags outside the button bounds. Defaults to true, matching iOS 26 behaviour where buttons stay visually pressed during drag-off and only release on pointer-up. Set to false for the traditional behaviour where leaving the hit-test area cancels the press.
GlassPage.settings β page-level glass configuration #
GlassPage now accepts an optional settings: LiquidGlassSettings parameter and internally wraps its child in an AdaptiveLiquidGlassLayer. This means all glass widgets inside the page (GlassAppBar, GlassCard, GlassButton, etc.) automatically inherit the page's glass settings β no need to set useOwnLayer: true or pass settings: to each widget individually.
GlassPage(
settings: LiquidGlassSettings(
glassColor: Color.fromRGBO(28, 28, 30, 0.8),
thickness: 30,
blur: 4,
),
child: Scaffold(...),
)
When settings is null, the layer inherits from GlassTheme or uses defaults.
GlassScaffold β comprehensive structural layer #
A new structural widget that coordinates interactions between GlassAppBar, GlassBottomBar, and the page body. It automatically handles edge-to-edge layout, scroll bleeding, and isolates glass rendering layers for maximum performance. This replaces the need to manually compose AdaptiveLiquidGlassLayer and GlassIsolationScope at the page root.
GlassInteractionSettings Theme #
Added a dedicated theme extension to globally configure interaction physics across all glass widgets β stretch, press scale, drag resistance, anchor stretch, and anchor stretch fine-tuning. No more passing interaction parameters to every widget manually.
GlassThemeData(
interaction: GlassInteractionSettings(
stretch: 0.2, // subtler drag-following globally
interactionScale: 1.03, // less scale-up on press
resistance: 0.01, // drag damping factor
anchorStretch: true, // iOS 26 rubber-band from anchor
anchorStretchSettings: AnchorStretchSettings(
intensity: 0.8,
squashFactor: 0.15,
),
),
)
Set stretch: 0.0 to disable drag-following app-wide while keeping press-scale. Individual widgets can still override any value.
π Fixes & Improvements #
Wide Button Stretch Distortion #
Fixed a rendering artifact where very wide GlassButtons would exhibit severe shape distortion at the extreme edges during horizontal stretch physics.ts.
GlassSearchBarConfig.cursorColor β cursor follows Flutter theme by default #
Thanks to @jfhair for PR #71. π
GlassSearchableBottomBar's expanded search field now exposes a cursorColor knob via GlassSearchBarConfig, and the default behaviour aligns with Flutter convention β the cursor follows the standard theme-resolution chain (Theme.of(context).textSelectionTheme.cursorColor β CupertinoTheme.primaryColor on iOS β Theme.of(context).colorScheme.primary) rather than being hard-coupled to textColor.
Apps that want the previous behaviour β cursor matching textColor β can opt in explicitly:
GlassSearchBarConfig(
textColor: Colors.white,
cursorColor: Colors.white, // β previously implicit
)
β Breaking change. Apps that set a
textColorand rely on the cursor implicitly matching it will see their cursor colour change to whatever theirTheme.of(context).colorScheme.primaryis (typicallyColors.blueif untouched). Two-line migration above.
π Fix β Premium stretch edge clipping #
Premium-quality GlassButton could exhibit jagged rasterization edges during stretch deformation. The Impeller LiquidGlassLayer rasterizes at its native resolution, which doesn't perfectly align with the deformed shape boundary during stretch.
Fixed by wrapping the premium glass surface in a vector ClipPath at the shape boundary. This renders at screen resolution every frame while preserving full refraction, chromatic aberration, and 3D specular β no quality downgrade needed.
π Fix β Mali GPU crash guard #
render_liquid_glass_geometry.dart now guards against zero and negative dimensions in both render() and renderAsync(). During jelly animations or rapid layout transitions (modal expansion, tab switching), matteBounds can momentarily collapse to zero dimensions β producing an invalid GPU texture request that crashes Mali drivers.
The fix returns a minimal 1Γ1 fallback cache for zero-dimension frames. Additionally, matte.toImageSync() is wrapped in a try/catch to handle Mali driver failures gracefully β returning a safe fallback instead of crashing the app. The next paint frame rebuilds the geometry with valid dimensions automatically.
π Fix β Searchable bottom bar collapsed shape #
The collapsed search button and tab indicator in GlassSearchableBottomBar used LiquidRoundedSuperellipse even when collapsed to a square. A superellipse with borderRadius: 32 on a 50Γ50 square has subtle flat segments between the arcs β invisible at rest but clearly distorted during stretch deformation.
Fixed by switching to LiquidOval when constraints are square (within 2px tolerance), which renders a mathematically perfect circle that stretches uniformly. During the collapse animation (when the width is still wider than the height), the superellipse is used to avoid a squashed oval appearance.
π¨ Visual β iOS 26 thin glass defaults #
The three default theme variants have been standardised to match the thin, refractive glass aesthetic of iOS 26:
| Property | Dark | Light | Minimal |
|---|---|---|---|
| thickness | 40 β 10 | 20 β 12 | 30 β 10 |
| blur | 5 β 4 | 6 β 5 | 12 β 8 |
| lightIntensity | 1.5 β 0.7 | 1.2 β 0.85 | unchanged |
| lightAngle | unset β 135Β° | unset β 135Β° | unchanged |
| chromaticAberration | unset β 0.01 | 0.3 β 0.02 | unchanged |
β Visual change. Apps using
GlassThemeVariant.dark,.light, or.minimalwithout explicitLiquidGlassSettingsoverrides will see thinner, subtler glass. This is intentional β the previous defaults were heavier than the native iOS 26 aesthetic. If you prefer the heavier look, set explicitthicknessandblurvalues in yourGlassThemeData.
β οΈ Semi-Breaking β GlassAppBar transparent by default #
GlassAppBar now renders a transparent navigation bar by default β no glass surface, no specular rim. This matches iOS 26's actual navigation bar pattern where the glass effect is on individual buttons, not the bar itself.
Previously, GlassAppBar always wrapped its content in an AdaptiveGlass surface with LiquidGlassSettings(blur: 15). This created a visible glass rectangle behind the title and actions β a Material-style app bar with glass paint, not an iOS 26 navigation bar. A better version of this to come next
To opt in to a glass background (e.g. for scroll-edge transitions), pass explicit settings:
// Before (0.12.x) β glass was always on:
GlassAppBar(title: Text('Title'))
// After (0.13.0) β transparent by default:
GlassAppBar(title: Text('Title')) // transparent, iOS 26 style
// Opt-in glass background:
GlassAppBar(
title: Text('Title'),
settings: LiquidGlassSettings(blur: 15, thickness: 10),
)
Additionally, quality now defaults to null (inherits from ambient scope) instead of GlassQuality.premium.
π¨ Visual β Specular rim refinement #
Standard/minimal quality glass surfaces now render a more refined specular inner-border rim:
- True inner border β the specular stroke is now clipped to its inner half via
_ShapeClip, creating an optically correct glass-edge reflection instead of a center-straddling stroke that bleeds outside the shape boundary. - Organic overlay blending β
BlendMode.overlayreplacesBlendMode.srcOver, so the rim reacts to the background colour underneath rather than appearing as a flat white line. Darker backgrounds produce subtler rims; lighter backgrounds produce brighter ones. - Flat-edge suppression β shapes with
borderRadius: 0(used byGlassAppBar,GlassSideBar,GlassToolbar) no longer render the specular rim. On full-width flat surfaces, the rim looked like a Material divider line rather than an internal glass reflection.
Only affects standard and minimal quality. Premium quality uses Impeller's native LiquidGlassLayer which has its own refraction-based edge rendering.
β‘ Performance β Quality adapter tuning #
- Faster degradation β Phase 3 runtime monitoring now triggers a quality step-down after 2 consecutive over-budget windows (previously 3), reducing reaction time from ~6 seconds to ~4 seconds. This means devices that genuinely can't sustain their assigned quality level are protected sooner.
- Documentation updated β removed provisional calibration warnings from warmup threshold docs. The 20ms premium / 28ms standard thresholds are now considered validated.
β οΈ Semi-Breaking β LiquidStretch.resistance default #
The default resistance value for LiquidStretch has changed from 0.08 to 0.01. This makes all stretch interactions feel more responsive and fluid β closer to the iOS 26 native feel. The previous value was overly dampened.
All widgets using LiquidStretch without explicitly setting resistance (including GlassButton, GlassCard, GlassContainer, GlassMenu) will feel stretchier. To restore the previous behaviour:
LiquidStretch(
resistance: 0.08, // previous default
child: ...,
)
π§ͺ Tests β 1898 passing (+124 new) #
- New
GlassButtontests:persistPressOnDragtrue/false behaviour, default values, cancel paths. - New
GlassSearchBarConfig.cursorColortests: default null, explicit value, independence fromtextColor. - Updated
glass_quality_adaptertests fordegradeWindowCount: 2. - Updated stretch tests for new
resistancedefault. - Updated
GlassAppBardefaults test for transparent-by-default change. - Updated golden tests for specular rim flat-edge suppression.
π¦ Example app #
- Keypad lock screen demo β new full-screen demo showcasing
GlassButtonin a PIN-entry layout. - Restructured showcase pages β all category pages (containers, feedback, input, interactive, overlays, surfaces) reorganised for cleaner presentation. More work to come...
0.12.8 #
π Fix β GlassTextField reverted to v0.12.4 + icon drift fix #
- Reverted to v0.12.4 β restored exact line-count and layout logic. The v0.12.6β0.12.7 changes introduced regressions (line breaks at wrong character boundary, icons pinned to container bottom).
- Fixed icon drift under system text scaling β in fixed-height mode, icons are now always centred relative to the container rather than relative to the text row. This prevents icons from shifting position when users change system text scaling. In dynamic-height mode (no
heightparameter),iconAlignmentis respected as before.
Thanks @g3mf0r for the detailed testing.
0.12.7 #
π Fix β GlassTextField icon alignment (retained) + line-count regression fix #
iconAlignment: .endno longer drifts under system Large Text. TheCenterwidget wraps only theTextField, not the entire iconRow, soCrossAxisAlignment.end/.startworks correctly against the full container height. (retained from 0.12.6)- Reverted line-count measurement back to
renderBox.size.width(the v0.12.4 approach). The v0.12.6RenderEditablewidth change caused line breaks to fire a couple of characters early. Thanks @g3mf0r for catching this.
0.12.6 #
π Fix β GlassTextField icon alignment and line-count accuracy #
iconAlignment: .endno longer drifts under system Large Text. TheCenterwidget now wraps only theTextField, not the entire iconRow, soCrossAxisAlignment.end/.startworks correctly against the full container height.- Line-count measurement is now pixel-perfect.
_measureLineCountwalks the render tree to find the actualRenderEditableand uses its layout width (which accounts for the internal_caretMarginβ 3 px). Falls back gracefully if the render walk fails.
0.12.5 #
β¨ New β GlassMenu.onClose callback #
Added onClose: VoidCallback? to GlassMenu. Fires when a close is triggered
(barrier tap, trigger re-tap, or item selection), before the animation completes.
Useful for synchronising external state such as a GlassMorphController.
Thanks to @g3mf0r for the contribution (#67).
0.12.4 #
π Fix β GlassTextField layout and reactivity #
onLineCountChanged fires correctly under fixed-height constraints #
The onLineCountChanged callback silently stopped firing after the first
measurement when the field was inside a fixed-height container (e.g.
SizedBox(height: 46) or height: 46 on the field itself). The internal
guard used size == _lastTextFieldSize β but a fixed outer height keeps the
RenderBox size constant, so the guard always exited early after the first
call. The fix replaces the size-equality guard with a (text, constrainedWidth)
guard: the callback fires whenever the text content or available wrapping width
changes, regardless of what the outer height is doing.
This also resolves the stale-state reactivity bug where _lines stored in
State stopped updating borderRadius after re-opening the keyboard.
Placeholder and text stay vertically centred under system Large Text #
When height is specified (fixed-height mode), the outer padding's vertical
component was applied inside the SizedBox, pushing placeholder text and icons
downward when the user enabled a large system font. The field now strips
vertical padding in fixed-height mode and centres the text row via Align,
matching the behaviour of GlassSearchBar. The padding parameter's
horizontal values are unchanged.
β¨ New β bottom panel for GlassTextField and GlassTextArea #
Both widgets now accept an optional bottom widget that renders below the text
area inside the same glass card. Use it to build the "rich composer" pattern β a
text input on top with an action bar, attachment strip, or formatting toolbar
below, all sharing one glass surface:
GlassTextField(
maxLines: 5,
minHeight: 44,
maxHeight: 160,
bottom: Padding(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row(
children: [
IconButton(icon: Icon(Icons.attach_file), onPressed: _attach),
const Spacer(),
IconButton(icon: Icon(Icons.send), onPressed: _send),
],
),
),
)
The panel renders inside the glass surface alongside the text area.
Callers can add a Divider between the text area and the panel if a visual
separator is desired. Not available on GlassTextField.search (that
constructor is single-line only; bottom is always null there).
0.12.3 #
π¨ Visual β Slider & Switch thumb refraction tuning #
GlassSliderthumb β increasedrefractiveIndex(1.15 β 1.3) andthickness(10 β 13) for a more pronounced glass lens feel. ReducedglassColoralpha (0.1 β 0.08),lightIntensity(2.0 β 1.8 premium),baseAlphaMultiplier(0.2 β 0.08 premium), andedgeAlphaMultiplier(0.4 β 0 premium) for a cleaner, more transparent thumb.GlassSwitchthumb β reducedrefractiveIndex(1.15 β 1.12) andglassColoralpha (0.1 β 0.08) for subtler refraction.- Material fade via
Opacitywidget β slider thumb now uses widget-levelOpacity(matchingGlassSwitchpattern) instead of color alpha for the press-down fade. Critical for Impeller: properly removes the child from the compositing tree so native refraction shows through.
β‘ Jelly physics β spring-based velocity #
GlassSliderjelly β replaced raw_velocitytracking with aSingleSpringControllerfeedingbuildJellyTransform. Produces smooth squash/stretch with natural deceleration and elastic bounce-back, matching the tab bar / bottom bar pill feel.maxDistortionraised (0.25 β 0.6),velocityScalelowered (30 β 2) to account for the spring's normalised 0β1 position range.
0.12.2 #
β¨ New β GlassTextField enhancements #
Three community-requested features for GlassTextField (and GlassTextArea):
Explicit size properties #
height, minHeight, and maxHeight give direct control over the field's dimensions β no wrapping SizedBox needed:
// Fixed height β matches GlassSearchBar's 44pt:
GlassTextField(height: 44, placeholder: 'Search')
// Constrained range β grows with content:
GlassTextField(minHeight: 44, maxHeight: 200, maxLines: 10)
height is mutually exclusive with minHeight/maxHeight (assertion enforced).
onLineCountChanged callback #
Fires whenever the number of rendered lines changes (accounting for text wrapping, not \n characters). Also fires on initial build. Uses the TextField's own RenderBox height β no external TextPainter math, so it works correctly with text scaling and system accessibility settings.
GlassTextField(
maxLines: 6,
onLineCountChanged: (lines) {
setState(() => _borderRadius = lines > 1 ? 8.0 : 20.0);
},
)
iconAlignment parameter #
Controls where prefix/suffix icons sit when the field spans multiple lines:
// Pin send button to bottom β chat composer pattern:
GlassTextField(
maxLines: 6,
iconAlignment: CrossAxisAlignment.end,
suffixIcon: Icon(Icons.send),
)
Accepts CrossAxisAlignment.start (top), .center (default), or .end (bottom). No visible effect on single-line fields.
All three features are forwarded through GlassTextArea.
GlassTextField.search named constructor #
A new convenience constructor that pre-configures GlassTextField with compact search-bar defaults: height: 44, iconSpacing: 8, padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8), borderRadius: 22, and textInputAction: TextInputAction.search. Eliminates the boilerplate previously required to match GlassSearchBar visuals:
GlassTextField.search(
placeholder: 'Search messagesβ¦',
prefixIcon: Icon(CupertinoIcons.search, size: 20),
useOwnLayer: true,
)
GlassSearchBar now uses this constructor internally, reducing duplicated decoration code.
π Fix #
-
onLineCountChangednow fires on programmatic controller changes β Previously the callback only responded to physical keyboard input (TextField.onChanged). Settingcontroller.text = '...'or callingcontroller.clear()(e.g. in a chat "Send" handler) did not re-measure the line count. The widget now actively listens to theTextEditingControllerand re-measures on any text mutation. -
Suffix icon spacing now respects
iconSpacingβ The gap before the suffix icon was hard-coded to 12px while the prefix icon correctly usedwidget.iconSpacing. Both sides now use the same parameter.
0.12.1 #
π Fix β eliminate rectangular blur halo over PlatformViews (iOS Impeller) #
LightweightLiquidGlass and _FrostedFallback previously wrapped their glass surface in ClipPath(ShapeBorderClipper(...)). When the parent was an iOS PlatformView (e.g. mapbox_maps_flutter MapWidget, video_player on iOS), the descendant BackdropFilter's rectangular blur output leaked past the rounded clip β visible as a faint square halo around the rounded glass shape, most obvious when light backdrop content scrolled underneath.
Flutter framework PR #177551 (merged Dec 2025, shipped in 3.41.0-0.0.pre+) fixed this at the engine level by forwarding ClipRRect clip data to the iOS PlatformView mutator stack β but only ClipRRect, not ClipPath, even when the path inside is mathematically a rounded rect.
This release routes shapes that resolve to a RoundedRectangleBorder (i.e. LiquidRoundedSuperellipse, LiquidVerticalRoundedSuperellipse) through ClipRRect instead of ClipPath. The engine fix now triggers and the halo disappears for those shapes.
LiquidOval is intentionally NOT routed through ClipRRect β empirically the engine fix doesn't forward ClipRRect with circular(double.infinity) nor a LayoutBuilder-computed finite radius on the LiquidOval path. Callers that need a halo-free circular glass surface over a PlatformView should use LiquidRoundedSuperellipse(borderRadius: size / 2) instead, which renders identically on a square widget and triggers the engine fix.
Closes upstream Flutter #175048 and #115926 for liquid_glass_widgets users.
0.12.0 #
β¨ New #
LiquidGlassWidgets.wrap() β theme parameter #
wrap() now accepts an optional GlassThemeData? theme parameter. When provided, it wraps the child in a GlassTheme β eliminating the need for a separate GlassTheme widget in your tree.
LiquidGlassSettings.standardOpacityMultiplier #
A new multiplier applied to the glass colour alpha when rendering in Standard mode. This allows tuning Standard 2D compositing opacity to achieve more parity with Premium 3D volumetric refraction without needing separate colour values for each mode.
LiquidGlassSettings(
glassColor: Colors.white.withValues(alpha: 0.3),
standardOpacityMultiplier: 0.4, // Standard renders at 0.3 Γ 0.4 = 0.12 alpha
)
Defaults to 1.0 (no change). Fully interpolated via LiquidGlassSettings.lerp() and wired through copyWith().
GlassPage β full-screen glass scaffold #
A new full-screen scaffold widget for glass-based layouts. Handles background imagery, status bar styling, and background sampling in a single widget.
enableBackgroundSampling defaults to true when a background widget is provided, and false otherwise β so the common case just works without extra configuration.
GlassPage(
background: Image.asset('assets/wallpaper.jpg'),
child: Scaffold(...),
)
Export hygiene #
glass_page.dartnow uses ashowclause: onlyGlassPageandGlassStatusBarStyleare exported (internal state classes are no longer public).liquid_glass_scope.dartnow uses ashowclause: onlyLiquidGlassScope,GlassBackgroundSource, andGlassRefractionSourceare exported.
π¨ Visual β Standard/Premium parity improvements #
Shader composite improvements (lightweight_glass.frag) #
The Standard-tier lightweight shader composite logic has been improved for closer visual parity with the Premium Impeller path. Shader rim constants are unchanged from 0.11.0 β AdaptiveGlass normalization now handles Premium β Standard scaling in Dart space instead:
- PATH A (background texture): now uses
applyGlassColorLW()β a luminosity-preserving glass tint that matches Premium's colour handling for both chromatic (mint, bronze) and achromatic (white, grey) glass colours. - PATH A ambient darkening:
ambientStrength Γ 0.25 + 0.08creates the glass shadow effect that visually separates glass from non-glass, matching what Premium achieves through blur compositing. - PATH A adaptive rim colour:
mix(bgRgb, white, 0.7)brightens the background at the edge, matching Premium'sgetHighlightColor. - PATH A edge-zone refraction: indicator-style background warping at rounded corners using
smoothstepedge zone with quadratic falloff β the same proven approach asinteractive_indicator.fragbut scaled for containers. Zero transcendentals (polynomialsmoothstep+ multiplies only). Flat interior pixels naturally produce zero offset. Currently active on surface widgets (GlassBottomBar,GlassTabBar,GlassSideBar,GlassToolbar) when abackgroundKeyis provided;GlassCardandGlassButtonuse PATH B and will benefit onceAdaptiveGlassgains scope-aware background key passthrough. - PATH A unified interactive glow:
uGlowIntensitypress-feedback now applies in PATH A, closing an architectural gap where switch/slider thumbs inside background-sampled containers had no glow. - Volumetric depth gradient: subtle top-to-bottom ambient shading (
+vertCoord Γ 0.04) in both PATH A and PATH B creates a natural 3D anchored depth feel, simulating light entering from above. Cost: one multiply + one add per fragment. - PATH B frost floor: 8% minimum material alpha ensures glass surfaces are always visible when
glassColor.a = 0(Premium default), preventing invisible glass in SrcOver compositing. - PATH B contrast-adaptive rim: shifts rim colour toward mid-grey on bright backgrounds so white-on-white borders remain distinguishable.
- Directional rim bonus: a small
0.15 Γ directionalInfluence Γ lightIntensityterm adds subtle lit-side variation on top of the constant rim base β matching how Premium's 3D bevel naturally brightens toward the light source.
Interactive widget transparency tuning #
GlassSwitchstandard thumb:baseAlphaMultiplier: 0.0,edgeAlphaMultiplier: 0.15β fully transparent body with subtle edge presence for a cleaner glass look.GlassSliderstandard thumb:baseAlphaMultiplier: 0.08,edgeAlphaMultiplier: 0.1β minimal body opacity with soft edge glow.
Elevated widget predictability #
Removed the arbitrary +0.2 alpha boost on elevated widgets inside AdaptiveGlass. Elevation is now expressed purely through the shader's densityFactor physics, making the opacity response predictable and proportional to user settings.
Interactive widget normalisation (GlassEffect) #
Standard-tier interactive indicators (slider thumbs, switch thumbs, segmented control pills) now apply the same normalisation as AdaptiveGlass β thickness Γ 0.4, lightIntensity Γ 0.6 β preventing the 2D shader from rendering these elements heavier than their Premium counterparts.
π¦ Example app #
- Quality comparison demo background image bundled as a local asset (
example/assets/mountain_landscape.jpg) β eliminates network dependency and first-frame loading flash.
0.11.0 #
β¨ New β Liquid Morph Engine (new architectural system) #
This release introduces the Liquid Morph Engine β a standalone, reusable physics and animation system for iOS 26-style liquid glass morphing. It lives in lib/engine/ and is fully decoupled from any specific widget.
GlassMenu is the first consumer of the engine. Future widgets (sheets, cards, buttons) will use the same engine to achieve consistent, physics-correct liquid glass transitions throughout the library.
Documentation:
docs/LIQUID_MORPH_ENGINE.mdβ full guide coveringGlassMorphController,LiquidMorphState,LiquidMorphPhysics, and how to integrate the engine into your own custom widgets.
Core engine types #
| Type | Role |
|---|---|
GlassMorphController |
Lifecycle owner β manages the spring, exposes open() / close() |
LiquidMorphState |
Immutable value object β one per frame, contains all render values |
MorphPhase |
Semantic lifecycle enum β tells you where in the animation you are |
MorphSpeed |
Enum β controls spring stiffness without exposing raw physics constants |
LiquidMorphPhysics |
Internal stateless math engine |
How it works #
Two conceptual "blobs" drive every morphing animation:
- Blob A (anchor) β the ghost trigger that shrinks away over the first 40 % of the animation, cleanly breaking the liquid bridge.
- Blob B (body) β travels from the trigger centre to the widget centre along a J-curve overshoot trajectory, expanding from trigger size to target size.
The SDF metaball shader creates the teardrop neck between the blobs automatically β there is no explicit neck geometry. LiquidMorphPhysics.compute() determines each blob's position, scale, and blend factor on every frame.
GlassMenu β first engine consumer #
- Teardrop open animation Β· The menu grows from the trigger point along the dual-curve SDF path, producing the iOS 26 "bubble emerging from button" effect.
- Rubber-band close physics Β· On dismiss the teardrop recoils with a critically-damped spring + overshoot tail, matching the tactile snap of native iOS context menus.
- Velocity-bump alignment Β· Spring initial velocity is seeded from touch velocity at release β fast flicks close snappily, slow releases settle deliberately.
- Handoff latching Β· Re-opening during a close animation inherits the in-flight velocity and reverses smoothly β no pop or cut.
- Blob scaling Β· Blob sizes scale relative to trigger size and computed menu height, so short and tall menus receive proportionally correct teardrop curvature.
See it live: The Apple Messages demo (
cd example && flutter run -t lib/apple_messages/apple_messages_demo.dart) showcases the morphing engine in a real-world context β tap the menu or Edit button at the top of the screen to trigger theGlassMenuwith full teardrop open/close physics.
Spring physics refinements #
- Critical damping (
ΞΆ = 1.0) on all spring controllers prevents oscillation on rapid successive opens. interactionScale,stretch, andstretchResistanceintegrate into the morphing path via the same spring solver used byLiquidStretch.
π Fixes #
-
GlassMenuβ safe area / notch clipping on iOS and Android Β· Menu position and maximum height were computed fromMediaQuery.padding, which is consumed by ancestorSafeAreawidgets and reports0inside a fully-safe tree. Switched toView.of(context).padding(raw hardware insets) so the menu is always clamped correctly regardless ofSafeAreanesting depth. Fixes the menu appearing under the Dynamic Island on iPhone 14 Pro and similar devices. -
GlassMenu(scrollable) β scrolling now works on large menus Β· Menus with more items than fit on screen can now be scrolled reliably.
π Example restructure β demos/ suite #
The example/ package has been reorganised for a cleaner public-facing demo experience:
-
New
example/lib/demos/folder containing seven self-contained, copy-pasteable demos:glass_menu_demo.dartβ all 9GlassMenuAlignmentpositions, scrollable item listglass_tab_bar_scrollable_demo.dartβ scrollableGlassTabBarwith dynamic tab addglass_modal_sheet_demo.dartβ all sheet states (peek / half / full), Apple Maps peek styleglass_bottom_bar_demo.dartβ magic-lens masking withGlassBottomBarbottom_bar_tab_width_demo.dartβtabWidthon both bar variants side-by-sidesearchable_bar_demo.dartβGlassSearchableBottomBaredge casesshape_debug_demo.dartβGlassButtonshape visualiser
-
Apple Messages demo (
example/lib/apple_messages/) β showcases the Liquid Morph Engine in a full real-world context; tap the menu or Edit button at the top to triggerGlassMenu. -
example/lib/modal_sheet_showcase/removed (file moved todemos/glass_modal_sheet_demo.dart). -
Experimental scratchpad scripts moved to git-ignored
example/lib/playground/.
0.10.10 #
Thanks to @g3mf0r for PR #55. π
β¨ New #
-
GlassMenuβmenuAlignmentenum Β· A newGlassMenuAlignmentenum (10 values:none,topLeft,topCenter,topRight,centerLeft,center,centerRight,bottomLeft,bottomCenter,bottomRight) lets you pin the menu to a specific edge or corner of its trigger instead of relying solely on auto-detection. The enum is now part of the public API surface exported fromglass_menu.dart. -
GlassMenuβautoAdjustToScreenwithmenuPaddingΒ· WhenautoAdjustToScreen: true, the newmenuPadding: EdgeInsets?parameter applies additional inset constraints so the menu body never clips against device edges. -
GlassMenuβitemBorderRadiusΒ· Controls the corner radius of individual menu item cells, independent of the outermenuBorderRadius.
π Fixes #
-
GlassTabBarβ multi-tab drag jump Β· Dragging the indicator across multiple tab widths in a single gesture now snaps to the correct distant tab. The previous implementation only incremented/decremented by Β±1 regardless of drag distance, causing the indicator to teleport unexpectedly when the finger crossed more than one tab boundary. -
GlassTabBarβ glass refraction during indicator drag Β· Refraction and shadow effects are correctly suppressed during the drag animation and restored on settlement, eliminating a visual glitch where the glass distortion would persist after releasing the indicator.
π§ͺ Tests #
- Added 4 new
GlassMenutests coveringGlassMenuAlignmentenum values,menuAlignmentparameter,autoAdjustToScreen+menuPadding, anditemBorderRadius. - Added 2 new
GlassTabBartests covering multi-tab drag jump (left and right) to prevent regression of the PR #55 fix.
0.10.9 #
Thanks to @g3mf0r for PR #54. π
β¨ New #
GlassTabBar(scrollable) β jelly physics on indicator drag Β· The scrollable indicator pill now feeds real-time drag velocity into the liquid glass shader, producing the same organic stretch-and-settle effect that fixed-mode tabs already had.
π Fixes #
-
LiquidGlassWidgets.wrapβadaptiveQuality: truewithoutadaptiveConfigpermanently locks tostandardΒ· The default fallback config was created withinitialQuality: GlassQuality.standard, which the adapter treats as a skip-Phase-2 signal β immediately jumping to Phase 3 atstandardwithout ever running the warmup benchmark. On capable devices (including the iPhone simulator on Apple Silicon) this prevented the adapter from ever discovering that the device can sustainpremium. Fixed by removing the erroneousinitialQualityfrom the fallback; Phase 2 now always runs when no explicit quality is provided. -
GlassTabBar(scrollable) β indicator overflows bar on low tab counts Β· The right drag boundary was computed asviewMaxinstead ofviewMax - indicatorWidth, allowing the pill to slide outside the bar when there were only 2β3 wide tabs. Corrected toviewMax - targetWidth. -
GlassTabBar(fixed) β tiny accidental drags switch tabs Β· Tab switching on drag-end now requires either a displacement greater than 20 % of the tab width or a flick velocity above 400 px/s, preventing unintended switches from small incidental movements. -
GlassTabBar(scrollable) β flick gesture ignored in scrollable mode Β· A horizontal flick with sufficient velocity now overrides the nearest-tab distance calculation and advances the indicator in the flick direction, matching the fixed-mode behaviour.
0.10.8 #
Thanks to @g3mf0r for PR #52. π
π Fixes #
-
GlassTabBarβ indicator drag drift on desktop/web Β· The indicator position was accumulated viadelta.dxadditions each frame, causing the pill to visually lag behind the pointer on desktop platforms where pointer events arrive at a higher frequency than the frame budget. Fixed by computing position from the absolute global pointer coordinate on every update event, eliminating accumulated drift. -
GlassTabBar(scrollable) β tab labels hidden behind indicator pill Β· TheSingleChildScrollView(tab labels) and the background pill were inserted in the wrong stack order β labels were painted first, then the pill on top, obscuring them. Fixed by inserting the pill before the labels so labels always paint above the pill (correct z-order). -
GlassTabBar(scrollable) β indicator fly-off past bar edges Β· The indicator pill had no boundary clamping in scrollable mode, allowing it to animate outside the visible bar area. Drag offset is now clamped to[scrollOffset - 35 %, scrollOffset + screen + 35 %].
β¨ New #
-
DividerSettingsβ new optionaldividerSettingsparameter onGlassTabBar. Renders animated vertical dividers between tabs with configurablethickness,indent,endIndent, customdecoration, animationduration/curve, and anisHideAutomaticallyflag that fades out dividers adjacent to the active tab. Includes acopyWithhelper for convenient inline customisation. -
Grab-to-drag in scrollable mode β the indicator pill in scrollable mode can now be directly grabbed and dragged to a new tab. Uses a
GestureArenaTeam(HorizontalDragGestureRecognizeras captain +TapGestureRecognizer) to correctly win the arena against theSingleChildScrollViewwhen the initial touch is within the active indicator's bounds. The scroll view retains natural scrolling behaviour when touching outside the pill. -
indicatorShadowβ new optionalindicatorShadow: List<BoxShadow>?parameter onGlassTabBar. Applies a drop shadow to the resting (solid-colour) indicator pill, improving contrast in light-mode themes where the pill and track share similar colours. The shadow is automatically suppressed during the liquid glass drag animation so it does not interact with the backdrop blur, and restored when the pill returns to its idle state.
0.10.7 #
Thanks to @yukinoaruu for PR #51. π
π Fixes #
GlassMenuβ trigger button dead zone after closing Β· After closing the menu, the trigger button would ignore taps for the duration of the closing spring animation (~95% of travel), forcing the user to wait several seconds before being able to reopen it. Fixed by separating the visual-hide threshold (0.05) from the input-block threshold (0.80) into two independent booleans:isButtonVisibleandisMenuBlocking. The button now becomes tappable again as soon as the animation drops below 80%, and the morphing glass overlay wraps inIgnorePointer(ignoring: value < 0.8)to prevent the contracting container from consuming the tap instead.
0.10.6 #
π Fixes #
GlassBottomBarβextraButtoncauses bar to float in the middle of the screen Β· Wrapped the innerRowin aSizedBox(height: barHeight)so theScaffold.bottomNavigationBarslot always receives an explicit tight height constraint. Without this, theExpandedchild introduced byextraButtonpropagated an unbounded height throughLiquidGlassLayer, causing Flutter to render the bar centred on screen instead of pinned to the bottom edge.
0.10.5 #
β¨ New #
SearchableBottomBarControllerβ addedopenSearch(),closeSearch(), andisSearchOpengetter for programmatic search control. Previously the only way to open search was by drivingisSearchActivefrom parent state.GlassTabBarβ addedmaskingQualityparameter (MaskingQuality.high/MaskingQuality.off), matching the existingGlassBottomBarAPI. Set tooffto disable the 8 px jelly-bloom expansion on lower-end devices.GlassSliderβ addedinteractionBehavior,glowColor, andglowRadiusfor consistent drag-glow customisation across all interactive widgets.GlassSegmentedControlβ sameinteractionBehavior,glowColor,glowRadiusparams added for API parity withGlassSliderandGlassTextField.LiquidGlassWidgets.respectsAccessibilityβ deprecated alias added pointing torespectSystemAccessibility. Will be removed in v1.0.
π Fixes #
GlassTextFieldβ fixed a use-after-dispose crash whenfocusNodecyclednull β external β null. The widget now tracks ownership with an explicit_ownsNodeflag and correctly creates a fresh internal node on each transition.GlassTabBarβ resolved scrollable-mode visual glitches. The indicator now stays perfectly glued to the active tab during scrolling without drifting, uses native "snappy" spring physics for consistent feel, and implements a three-layer rendering architecture so the solid indicator pill cleanly clips at the rounded viewport corners while the 8px jelly bloom expands freely over the tab bar boundaries.
0.10.4 #
A huge, heartfelt thank-you to @yukinoaruu for PR #49. π
We made a mess of the original 0.10.3 merge of his work β introducing regressions that broke the very things he had so carefully built. He came straight back, fixed every issue, and did it with incredible patience and generosity. This release is entirely his. If you are enjoying GlassMenu, it is because of him.
π Fixes (regressions from 0.10.3 merge) #
- GlassMenu β full-list rebuilds on every pointer event Β· Restored the
_cachedWrappedItemsmechanism that was accidentally dropped. The previous merge caused the entire wrapped-item list to be recreated on each pointer move, resetting pressed/hover states mid-gesture and tanking performance on menus with many items. - GlassMenu β selection and hover state precision Β· Migrated to a
ValueNotifiersystem (_hoveredIndexNotifier,_isDraggingNotifier). Individual menu items now rebuild in isolation instead of triggering a fullsetStateon the entire menu tree, keeping animations at a steady 60 fps. - GlassMenu β ghosting on selection pill Β· Fixed a double-background artifact where the selected
GlassMenuItempainted its own hover fill on top of the sliding pill, producing a faint ghost ring. Selected items now transition toColors.transparentinstantly. - GlassMenu β disabled items could be tapped Β· Tapping a disabled item no longer calls
onTapor closes the menu. The pill highlight correctly skips disabled items during pointer tracking. - GlassMenu β double
onTapfiring Β· Removed a redundantonTapcallback in the internal wrapped-item builder that was causing every selection to fire twice. - GlassMenu β
RangeErrorwhen item list shrinks while open Β·didUpdateWidgetnow clears_hoveredIndexwhenitems.lengthdecreases, preventing an out-of-bounds crash when the pill tried to measure a deleted item. - GlassMenuItem β disabled opacity Β· Disabled items now render at
Opacity(0.4)to match the design spec and test expectations. - GlassMenuLabel β hybrid
title/childAPI Β·GlassMenuLabelnow accepts either atitleString (rendered as stylised uppercase) or an arbitrarychildWidget, enabling diverse non-interactive content beyond simple section headers. - GlassMenuLabel β
heightdefault Β· Defaultheightset to30.0so the selection pill cannot drift when items with non-standard font sizes are mixed in. - GlassMenu β
glowIntensityparameter Β· AddedglowIntensityand wired it through toGlassContainer, completing the full interaction-glow parameter surface. - GlassMenu β
glowOnTapOnlydefault corrected Β· Default changed totrueto prevent a permanently stuck glow artefact during scroll and drag gestures. - GlassMenu β stretch parameter rename Β· Renamed
allowPositiveXStretch/allowNegativeXStretch/allowPositiveYStretch/allowNegativeYStretchtoallowPositiveX/allowNegativeX/allowPositiveY/allowNegativeYto align with theLiquidStretchAPI surface. - GlassMenu β compositing architecture Β· Removed redundant
RepaintBoundarynodes that were leaving descendant glass layers DETACHED from the compositor scene, and movedGlassGlowinsideGlassContainer's clip subtree to prevent glow bleed onto the background.
β οΈ Breaking β GlassMenu stretch parameter renames #
The four optional stretch-axis override parameters introduced in 0.10.3 have been renamed:
| 0.10.3 name | 0.10.4 name |
|---|---|
allowPositiveXStretch |
allowPositiveX |
allowNegativeXStretch |
allowNegativeX |
allowPositiveYStretch |
allowPositiveY |
allowNegativeYStretch |
allowNegativeY |
All four remain optional with null defaults (auto-inferred from menu position). Only code explicitly passing the old names needs updating.
0.10.3 #
Big thanks to @yukinoaruu for PR #47 β a comprehensive interaction engine upgrade for GlassMenu that brings it more in line with iOS 26 context menu behaviour. π
β¨ Features #
Heterogeneous menu items β GlassMenuDivider and GlassMenuLabel #
Menus now accept any Widget, enabling iOS 26-style section grouping:
GlassMenu(items: [
const GlassMenuLabel(title: 'Actions'), // renders as 'ACTIONS'
GlassMenuItem(title: 'Save', onTap: () {}),
const GlassMenuDivider(),
GlassMenuItem(title: 'Delete', isDestructive: true, onTap: () {}),
])
GlassMenuLabel exposes a height parameter (default 30.0) so custom font sizes don't drift the selection-pill position.
GlassMenuItem β rich content #
Six new parameters: subtitle, enabled, titleStyle, subtitleStyle, iconColor, iconSize.
Scroll-aware selection pill #
A sliding highlight follows the pointer and disappears automatically when the user starts scrolling (10 px drag-slop guard + ScrollNotification listener).
Elastic stretch and scroll-safe glow #
GlassMenu now wraps in LiquidStretch for spring physics on drag. glowOnTapOnly: true (the new default) suppresses the glass glare after a drag, preventing a stuck-glow artefact during list scrolling. Full parameter surface: interactionScale, stretch, stretchResistance, stretchAxis, allowPositiveX/NegativeX/Y.
New primitives on GlassGlow and GlassContainer #
GlassGlow.enabled, GlassGlow.glowOnTapOnly, and GlassContainer.glowIntensity are now available for custom integrations.
π Fixes #
- GlassMenu β double
BackdropFilterΒ· Removed an extra blur layer aboveGlassContainerthat doubled the blur sigma and created an over-frosted ring. - GlassMenu β DETACHED compositing layers Β· Removed the outer
RepaintBoundarywrapping_buildMorphingContainer. WhenGlassContainer(useOwnLayer: true)installs aBackdropFilterlayer it forces compositing on the entire subtree; aRepaintBoundaryabove it fought the compositor forOffsetLayerownership, leaving descendantRepaintBoundarynodes (i.e. eachGlassMenuItem's glass layer) DETACHED from the scene.GlassGlowandGlassContaineralready own their compositing layers β no extra boundary is needed. Separately,Opacitywidgets at>= 1.0are now skipped entirely so no gratuitousOpacityLayeris inserted when compositing is already being forced by aBackdropFilterdescendant. - GlassMenu β layout overflow during open animation Β·
GlassContainer(height: currentHeight)propagated tight height constraints through its entire subtree during the morph. When menu items became visible (previously atvalue > 0.65), the container was only ~114 px tall while 3 items needed 132 px, causing theColumninsidePositioned.fillto overflow by 18 px. Fixed by deferring content rendering untilvalue β₯ 0.85, exactly whencurrentHeightbecomesnulland the container sizes naturally β no tight-constraint cascade possible. - GlassMenu β interaction glow bleeds onto background Β·
GlassGlowpreviously wrappedGlassContainerfrom the outside._RenderGlassGlowLayer.paint()calledcanvas.drawCircle()over the full overlay canvas with no shape boundary, causing the radial gradient to paint beyond the menu's glass shape onto the background. Fixed by movingGlassGlowinsideGlassContainer'sclipBehavior: Clip.antiAliassubtree β matching the architecture used byGlassButton. - GlassMenuItem β
AnimatedScalelayout overflow on press Β·AnimatedScale(backed byRenderTransform) retains the pre-scale layout size during a 0.98-scale press animation, causing a spurious overflow against the menu's boundedPositioned.fill. Fixed by wrappingAnimatedScaleinSizedBox(height: effectiveHeight)to isolate the transform's layout footprint. - GlassMenu β selection pill layout exception Β·
AnimatedPositionedis now inside a boundedSizedBox(height: totalH) β Stack, preventing a debug-mode layout exception and an out-of-bounds pill position when scrolled. - GlassMenu β
RangeErroron item removal Β·didUpdateWidgetclears_hoveredIndexwhenitems.lengthshrinks while the menu is open. - GlassMenu β
GlassMenuItemstate flicker Β· Wrapped items cached; only rebuilt whenwidget.itemschanges, preventing pressed/hover resets during the 60 fps spring ticker. - GlassGlow β permanently muted glow Β·
didUpdateWidgetresets_glowSuppressedwhenglowOnTapOnlyis toggled off. - GlassMenuItem β desktop hover state leak Β·
dispose()clears_isHovered. - Impeller β extreme-stretch glyph-bounds crash Β· Scale determinant clamped before reaching the shader.
- Android β negative safe-area assertion Β·
sysBottom > 25guard added.
β οΈ Semi-Breaking #
GlassMenu.items changed from List<GlassMenuItem> to List<Widget>. Existing code compiles unchanged β only typed List<GlassMenuItem> variable declarations need widening.
π§ͺ Tests β 1,648 passing #
0.10.2 #
Fixes #
- GlassTabBar (scrollable) β indicator clipping Β· Migrated the selected-tab indicator to an overlay architecture outside
SingleChildScrollView, eliminating clip artifacts during scrolling and preserving the full iOS 26 glass bloom expansion. - GlassTabBar (scrollable) β tap fires on scroll Β·
onTabSelectedno longer fires when the user scrolls the tab bar; selection is now only triggered on confirmed taps. - GlassTabBar (scrollable) β bloom activates on scroll Β· The pressed indicator bloom no longer activates when scrolling the tab bar content.
- GlassTabBar (scrollable) β indicator pulsates on transition Β· Fixed a threshold bug that caused the bloom to flicker during tab-switch animations.
- GlassTabBar (scrollable) β scroll into view Β· Tapping or programmatically selecting a partially-visible tab now smoothly scrolls it fully into view.
- GlassAdaptiveScope β Android false-negative quality downgrade Β· Mid-range Android devices with Impeller/Vulkan can report inflated warmup P75 values (17β18 ms) due to GPU clock-scaling and JIT shader cache warm-up β not actual slowness. The previous
premiumthreshold of< 16 ms(the raw 60-fps frame budget) was too strict and incorrectly demoted capable hardware tostandardorminimal. Thanks @hank205 for the detailed diagnostic log. π - GlassModalSheet /
.show()/GlassModalSheetScaffoldβdragIndicatorWidthΒ· The drag handle pill width was previously hardcoded at 36 (iOS native). A newdragIndicatorWidthparameter lets you customise it β e.g.64for sheets where a more prominent handle better suits the layout. Defaults to36, no breaking change. Thanks @jfhair (#46). π
Changes #
GlassQualityAdapter/GlassAdaptiveScopeConfig/GlassAdaptiveScopeβ configurable warmup thresholds Β· Two new parameters let you tune (and help us calibrate) the Phase 2 warmup classification thresholds:warmupPremiumThresholdMsβ P75 below this βpremium. Default raised from16.0to20.0to account for Android GPU warm-up inflation. (Calibration status: 1 device report β please share yours!)warmupStandardThresholdMsβ P75 at or below this (and above premium) βstandard. Default28.0. (Calibration status: provisional β no real-device data for this band yet.)skipInitialFramesraised from 60 β 90 (β1.5 s at 60 Hz) to give Android more time for GPU clocks and shader caches to settle before the benchmark begins.
Phase 3 hysteresis remains the safety net. If a device cannot sustain its warmup-assigned quality, it steps down automatically within ~6 seconds β the new thresholds only affect the initial classification, not runtime correction.
β Community calibration needed β especially for
warmupStandardThresholdMs. If your device produces a warmup P75 in the 20β28 ms range, please enabledebugLogDiagnostics: trueand post your P75 + device model to the Threshold Calibration Discussion.
0.10.1 #
Big thanks to @yukinoaruu (#43) and @jfhair (#44, #45) for three excellent contributions this release. π
Fixes #
- GlassModalSheet β child State preservation Β· Removed
GlobalObjectKeyfrom the internalFocusbridge. The key was changing every rebuild, quietly tearing down childState(scroll positions, controllers, etc.) on each expand/collapse. (#44) - GlassModalSheet β
onStateChangedskipped on slow drag Β· Introduced_settledStateto track the last published state separately from the in-flight animation target. Side-effects (haptics, callbacks, scroll-to-top) now fire reliably after a drag that crosses a snap threshold mid-gesture. (#45) - GlassModalSheet β ghosting and jitter Β· Fixed visual artefacts during sheet transitions. (#43)
- GlassModalSheet β element subtree stability Β·
LiquidStretchnow always returns a consistent widget type regardless ofinteractionScale/stretchvalues, preventing a full subtree teardown on the frame the sheet reaches full expansion. - LightweightLiquidGlass β null-shader passthrough Β· The widget tree shape is now stable while the fragment shader loads asynchronously; a tinted passthrough is painted instead of switching widget types.
0.10.0 #
β οΈ Breaking β Pre-v1 API Cleanup #
LiquidGlassWidgets.wrap() β child is now a required named parameter #
Before:
LiquidGlassWidgets.wrap(const MyApp(), adaptiveQuality: true)
After:
LiquidGlassWidgets.wrap(child: const MyApp(), adaptiveQuality: true)
This aligns with Flutter widget conventions where child is always named.
GlassModalSheetScaffold β parameter renames #
| Old | New | Reason |
|---|---|---|
background: |
body: |
Matches Flutter Scaffold.body β it's the primary content, not a visual property |
sheetChild: |
sheet: |
Cleaner, matches Flutter naming patterns |
Before:
GlassModalSheetScaffold(
background: MyMapWidget(),
sheetChild: MySheetContent(),
)
After:
GlassModalSheetScaffold(
body: MyMapWidget(),
sheet: MySheetContent(),
)
GlassQualityAdapter.skipStaticProbeForTesting β @visibleForTesting annotated #
The static field is now annotated @visibleForTesting. Production code referencing it
will receive an analyzer hint. Usage in test files is unchanged.
π Fix β Android glass fallback on capable devices #
GlassQualityAdapter was applying the static probe result (GlassQuality.minimal) without
respecting minQuality. On some Android devices ImageFilter.isShaderFilterSupported
returns a false negative, causing the glass shader to be skipped even though the hardware
supports it β the only workaround being adaptiveQuality: false.
minQuality is now honoured as a true floor even when the static probe fires:
// Prevents fallback on Android devices with a false-negative static probe
LiquidGlassWidgets.wrap(
child: const MyApp(),
adaptiveQuality: true,
adaptiveConfig: const GlassAdaptiveScopeConfig(
minQuality: GlassQuality.standard,
),
)
β¨ New β Community contributions #
GlassSearchBarConfig.searchIcon β custom search icon (PR #41) #
The search pill now accepts a fully custom Widget in place of the default CupertinoIcons.search glyph:
GlassSearchBarConfig(
onSearchToggle: (active) { β¦ },
searchIcon: const Icon(CupertinoIcons.sparkles, color: Colors.white),
)
When searchIcon is null (default) the behaviour is unchanged.
indicatorExpansion β tunable jelly-stretch on bottom bars (PR #40) #
Both GlassBottomBar and GlassSearchableBottomBar now expose indicatorExpansion
to control how far the active-tab pill stretches during a drag gesture:
GlassBottomBar(
tabs: myTabs,
selectedIndex: _index,
onTabSelected: _onTab,
indicatorExpansion: 8, // default 14; lower = tighter morph
)
GlassModalSheet β two-phase organic interpolation (PR #39) #
Thanks to @yukinoaruu for PR #39.
The sheet's corner-radius animation now uses a two-phase curve that separates the
rapid initial expansion from the final settle, eliminating the snapping artifacts
that were visible at the half β full transition on some devices.
The fix also corrects resolveAdaptiveRadius to use logical screen height
(MediaQuery.size.height) instead of viewPadding.top as the primary Pro Max
detector, preventing false-positive 54 dp radii on some non-Pro-Max iPhones with
unusually high status-bar padding.
Asymmetric top/bottom corner radii in premium pipeline (PR #42) #
LiquidVerticalRoundedSuperellipse now feeds independent top/bottom corner radii
into the premium SDF shader via a 7-float-per-shape stride, enabling sheets that
hug the device chassis curve at the bottom while keeping a tighter radius at the
top β matching the Apple Music / Apple Maps card style:
LiquidGlass(
shape: const LiquidVerticalRoundedSuperellipse(
topRadius: 20,
bottomRadius: 54, // tracks iPhone 15 Pro Max chassis
),
child: myContent,
)
Shader note: all shaders continue to pass
glslangValidatorSPIR-V validation. The new stride-7 path is gated ontype == 3insdf.glsland leaves the existing stride-6 path untouched.
0.9.6 #
π Fix β GlassModalSheet interaction glow in full state #
Thanks to @yukinoaruu for PR #38.
- Haptic & glow suppression in full state:
HapticFeedback.selectionClick()and_saturationController.forward()were firing on every touch when the sheet was inSheetState.fullβ where the glass surface is fully opaque and neither effect is visible. Both are now gated on!isFull, eliminating spurious haptic feedback and redundant animation ticks. - Background glass hides when content glass is active: Added an
Opacity(0.0)on the backgroundAdaptiveGlasslayer whenexpandProgress > 0.98andmaintainContentGlassis enabled. Prevents "glass on glass" shader conflicts in Premium mode at full expansion. - Interaction glow threshold tightened:
GlassGlowpulse guard lowered fromexpandProgress < 0.98to< 0.9to match the existing saturation gate β consistent behaviour across all glow signals. GlassModalSheetgeometry defaults refined:topBorderRadiusdefaults to56(wasnull),horizontalMarginto5.0(was8.0),bottomMarginto6.0(was8.0) for tighter, more native-feeling geometry.InteractionNotificationexported:InteractionNotificationis now part of the public API surface, enabling consumers to dispatch Smart Silence events from their own widgets.- Corner radius tuning:
GlassThemeHelpers.resolveAdaptiveRadiusvalues updated to 54 / 46 / 46 (Pro Max / Pro / Notch) for a more conservative, closer-to-system look.
π§ͺ Tests β Coverage improvements (1,573 tests) #
Extended branch coverage across five previously under-tested subsystems. Full test count grew from 1,491 β 1,573 (+82 tests).
0.9.5 #
β¨ Feature β Asymmetric corner radii & floating peek geometry for GlassModalSheet #
Thanks to @yukinoaruu for PR #37.
- Shader fix:
lightweight_glass.fragnow supports per-quadrant corner radii via a newuData6uniform (slots 24β27). A sentinel ofuCornerRadius = -1.0enables asymmetric mode; all existing symmetric shapes fall through unchanged. - Clip gap fix:
ClipPathgeometry on the Skia/Web path is now aligned toRoundedRectangleBorder(circular arc) to match the shader SDF β eliminates the sub-pixel transparent notch at sheet corners. - Peek geometry: Five new optional params on
GlassModalSheet/GlassModalSheetScaffoldβpeekWidth,peekHorizontalMargin,peekBottomMargin,peekTopBorderRadius,peekBottomRadiusβ for Apple Maps-style floating pill peek states. - Cleanup:
forceSpecularRimremoved fromAdaptiveGlass,GlassSheet,GlassModalSheet, andGlassModalSheetScaffold. The shader renders the specular rim natively; no migration needed.
π Fix β GlassSearchableBottomBar dismiss pill focus & keyboard restoration #
The dismiss (Γ) pill was calling FocusScope.of(context).unfocus() which left the FocusNode in a "previously focused" state. This caused Flutter to restore the keyboard on back-navigation, and made the first post-dismiss tap get swallowed by focus routing.
Fixed by:
- Replacing
FocusScope.unfocus()withFocusManager.instance.primaryFocus?.unfocus()in the DismissPill, fully clearing focus state. - The Γ button now only dismisses the keyboard β it does not collapse the search state. This matches the real Apple Music / Apple News behaviour where the search bar remains visible (unfocused/ready) after tapping Γ. The caller explicitly collapses search by tapping the home pill or switching tabs.
onCancelTapfires first (before the unfocus) so callers can react (clear results, analytics, etc.) before focus is released.
A new onCancelTap: VoidCallback? on GlassSearchBarConfig gives callers a hook into the Γ tap.
β¨ Demo β Apple Music mini-player refinements #
High-fidelity improvements to the Apple Music demo to match the real Apple Music app:
- Play pill visibility: The floating play pill now stays visible when the search bar is in the "search ready" state (keyboard dismissed). It only hides when the keyboard is actively up (
_searchFieldFocused), matching real Apple Music behaviour. - Dynamic icon colour:
collapsedLogoBuildernow shows the selected (red) icon in scroll-collapse mini mode and the unselected (white) icon when search is active, via a static_kTabsfield so tab definitions aren't duplicated. - Play pill positioning:
aboveBarBottomis now responsive to the bar's current height β switching tocollapsedNavBarHwhen search is active so the pill doesn't drop excessively when the bar shrinks. - Play pill animates on search from mini mode: When search is activated from the scroll-collapsed mini state, the play pill animates from the mini gap position back to its full-width position above the expanded search bar, matching real Apple Music.
- Home pill restores full bar from any state: Tapping the home pill now always calls
_dismissMiniMode()when in mini mode β whether arriving from scroll-collapse or from search β scrolling to top and restoring the full 3-tab bar. - Library default preserved:
collapsedLogoBuilderin the library remainsunselectedIconColorβ the Apple Music colour logic is isolated to the demo'sGlassSearchBarConfig. - Multi-tab scroll fix:
_dismissMiniModenow uses_activeScrollController(per active tab) instead of hardcoding the home tab's controller, fixing a bug where tapping Radio/Library in mini mode would leave the bar stuck.
0.9.4 #
β¨ Feature β GlassSearchableBottomBar programmatic interaction callbacks #
Addresses two community-requested quality-of-life gaps for GlassSearchableBottomBar.
1. onBarTap β tap-to-restore after scroll-to-hide #
A new onBarTap: VoidCallback? parameter on GlassSearchableBottomBar fires whenever the user taps anywhere on the bar. The callback is wired through a translucent GestureDetector wrapper, so all internal handlers (tab selection, search toggle, indicator drag) continue to work normally β there is zero interference.
Primary use-case is restoring the bar after a scroll-to-hide animation that is managed in the caller's code:
GlassSearchableBottomBar(
onBarTap: () => setState(() => _barVisible = true),
...
)
When onBarTap is null (the default) no extra widget is inserted into the tree β zero overhead.
2. onSearchFieldTap β detect taps on the active search field #
A new onSearchFieldTap: VoidCallback? parameter on GlassSearchBarConfig, passed directly to TextField.onTap. Fires on every tap of the expanded search field body, including re-focus taps after the keyboard was dismissed.
Useful for navigating to a dedicated search screen, showing a suggestion overlay, or logging an analytics event without needing to own the FocusNode:
GlassSearchBarConfig(
onSearchToggle: ...,
onSearchFieldTap: () {
showSuggestions();
analytics.log('search_field_tapped');
},
)
Zero breaking changes. Both parameters are optional with null defaults.
0.9.3 #
β¨ Feature β GlassModalSheet system & rendering performance refinement #
Big thanks to @yukinoaruu for PR #33 β a comprehensive and beautifully engineered contribution that brings a whole new class of interactive modal sheet to the library.
1. GlassModalSheet system #
A new, comprehensive modal sheet implementation supporting three interactive states: peek, half, and full.
- Physics-Driven Transitions: Spring physics for fluid, organic state changes.
- Asymmetric Geometry: Morphs from a rounded floating pill to a sharp-bottomed full-screen container using the new
LiquidVerticalRoundedSuperellipse. - Isolated Mechanics: Logic separated into a robust state machine (
glass_modal_sheet_state.dart) and physics handler (glass_modal_sheet_mechanics.dart) β a clean architectural blueprint for future complex components.
2. Device-Aware Adaptive Radius #
An intelligent radius resolution algorithm that infers the ideal corner curvature from the device's physical safe area β Dynamic Island vs. Notch vs. Android Home Bar β automatically matching glass curvature to device hardware without manual updates.
3. Advanced Visual Feedback β Pulse System #
A global pulse synchronisation system in the rendering layer allows GlassModalSheet to trigger coordinated saturation and lighting pulses during high-velocity interactions, giving the glass surface a "living", organic feel.
4. Smart Silence β suppressInteractionOnChildren #
InteractionNotification support prevents the "double-reacting" artifact where both a button and the sheet scale simultaneously on a single tap. Child buttons/switches can seamlessly suppress the parent sheet's scaling and glow effects when tapped.
5. New shapes & LiquidStretch constraints #
LiquidVerticalRoundedSuperellipse: Enables asymmetric corner radii (top-rounded, bottom-flat) essential for the modal sheet's full-screen morphing animation.- Axis constraints:
allowPositive/allowNegativepivot support prevents the sheet from "collapsing" downward when dragged β it only stretches upward as a tactile response.
Documentation & Testing #
docs/assets/GLASS_MODAL_SHEETS_GUIDE.mdβ comprehensive developer guide covering the full parameter surface and state behaviours.test/widgets/overlays/glass_modal_sheet_test.dartβ 679 lines of rigorous unit and widget tests covering state transitions, gesture arena logic, and physics edge cases.
Zero breaking changes. GlassModalSheet is additive β all existing GlassSheet usages are unaffected.
π Fix β Selected icon colour washed out by glass indicator #
A huge shoutout and thanks to @jfhair for spotting this issue and putting together PR #29 β it was a fantastic catch, and you had exactly the right instinct on the fix!
The active-tab icon was visually muted ("dull") at rest because the AnimatedGlassIndicator glass lens was painting over the icon layer. Simply moving the indicator behind the icons restores vibrancy but kills the refraction effect β the glass shader needs icons beneath it to warp them as the pill moves.
The fix uses a split-pass sandwich: the pill's solid background renders below the icons (full vibrancy at rest), while the glass shader renders above them (refraction preserved during animation). Both GlassBottomBar and GlassSearchableBottomBar are updated. Zero breaking changes.
π Fix β GlassSheet specular rim artifact & washed-out inner elements #
Inspired by @yukinoaruu's work in PR #33, who introduced the forceSpecularRim flag and first surfaced this class of visual fidelity issue with the lightweight glass renderer.
The problem & fix #
On the Skia/Web (lightweight) rendering path, a refractiveIndex of 0.7 on a large GlassSheet produced a hard, visible border around the sheet β a bright "line" that looked like an artifact rather than a premium glass surface.
Lowering it globally to fix the sheets caused components inside the sheet to lose their specular highlights and become washed out.
We've introduced semantic preset separation via two distinct RecommendedGlassSettings presets to solve this:
RecommendedGlassSettings.overlay(refractiveIndex: 0.7): For cards, buttons, and small interactive widgets.RecommendedGlassSettings.sheet(refractiveIndex: 0.15): For large bottom sheets and modal overlays.
All GlassSheet.show() calls in the demo app now use the sheet preset, while every GlassButton.custom and GlassCard inside a sheet explicitly passes settings: RecommendedGlassSettings.overlay. The package-level default for GlassSheet (glass_sheet_defaults.dart) has also been updated to use refractiveIndex: 0.15 for a better out-of-the-box experience.
Zero breaking changes.
0.9.2 #
π Fix β GlassSwitch initial-state bloom anchor & polish #
-
First-click bloom anchored correctly. A switch initialised with
value: truenow anchors the bloom to the right edge on the very first tap, matching all subsequent interactions. Previously_isMovingForwardwas hardcoded totrueat construction regardless ofwidget.value. -
_justEndedDragrace condition eliminated. The flag is now consumed atomically insidedidUpdateWidgetrather than being reset one frame later viaaddPostFrameCallback, preventing a rare double-bloom after a drag toggle. -
Floating-point guard hardened. Animation controller resets now use
>= 0.99instead of== 1.0, making the bloom sequence robust against sub-epsilon drift during rapid consecutive toggles. -
Dead code removed (
glassOverlayno-op widget). -
Haptic feedback added.
GlassSwitchnow emitsHapticFeedback.lightImpact()on tap-toggle, when the thumb crosses the 50 % midpoint during a drag, and on drag-release snap (when the midpoint was never crossed, e.g. a fast flick). Opt out withenableHaptics: false. -
3 new regression tests added;
GlassSwitchtest count now 24.
Zero breaking changes.
0.9.1 #
π Fix β Adaptive quality system calibration #
Three coordinated improvements to GlassAdaptiveScope / GlassQualityAdapter that
prevent modern flagship devices from being incorrectly demoted to standard quality
during app startup.
1. Startup-skip window (skipInitialFrames = 60) #
Phase 2 now discards the first 60 frames (β 1 second at 60 Hz) before collecting warmup data. Those frames capture shader compilation, the first route transition, and provider/localisation initialisation β all artificially inflated and unrepresentative of steady-state glass rendering. Discarding them means the warmup benchmark reflects actual glass workload, not cold-start overhead.
The constant is tunable for testing: GlassQualityAdapter.skipInitialFrames = 0.
2. Raised premium threshold: 12 ms β 16 ms #
The old threshold of 12 ms (75 % of a 60 fps frame budget) was too tight. The new threshold is 16 ms β one full 60 fps frame budget β which has a cleaner semantic meaning: "can the device render a premium glass frame within the 60 fps budget at P75? Yes β premium."
| P75 raster time | Before | After |
|---|---|---|
| < 12 ms | premium | β |
| < 16 ms | standard | premium |
| 16β20 ms | standard | standard |
| > 20 ms | minimal | minimal |
3. allowStepUp defaults to true #
Previously allowStepUp defaulted to false, meaning a Phase 2 decision could never
be corrected at runtime. If Phase 2 still makes a conservative call (e.g. on a device
under thermal load at startup), Phase 3 can now self-correct after 10 consecutive
under-budget windows (β 20 seconds) + an 8-second cooldown.
The step-up is deliberately slow and invisible to users. Set allowStepUp: false
explicitly if you need to lock quality for the session.
Zero breaking changes (adaptive fix) #
All three changes are additive or alter defaults in a user-beneficial direction.
Explicit constructor overrides (allowStepUp: false, skipInitialFrames, custom
threshold via targetFrameMs) continue to take precedence.
π Fix β GlassSwitch drag interaction #
GlassSwitch now supports tap and horizontal drag simultaneously without either
interaction interfering with the other.
What was fixed:
- Tap animation restored β registering both
onTapandonHorizontalDrag*on the sameGestureDetectorcaused Flutter's gesture arena to drop one interaction after the first touch. Taps now useonTapDown/onTapUpso they share the gesture stream cleanly with drags. - Slow drag no longer cancels β Flutter fires
onTapCancelbefore confirming a horizontal drag, which was deflating the "liquid bloom" pill prematurely._onDragStartnow stops any in-progress deflation and restores the plump state immediately. - Animation resets between interactions β the thickness animation controller
was left at
1.0after its first cycle and silently skipped the bloom on subsequent taps. It now resets to0.0before each new forward pass.
Gesture behaviour unchanged from the user's perspective: tap = full liquid jump animation; drag = thumb tracks finger with symmetric pill stretch; flick = velocity-based snap.
Zero breaking changes #
No API changes. All existing GlassSwitch usages continue to work without
modification.
π Fix β interactionGlowColor now reads from GlassThemeData #
GlassBottomBar and GlassSearchableBottomBar (including its collapsedLogoBuilder
state and SearchPill) previously used a hardcoded white glow (0x33FFFFFF) when
no explicit interactionGlowColor was set, silently ignoring any GlassThemeData
override on the ancestor tree.
Resolution order is now:
interactionGlowColor param β GlassThemeData.glowColorsFor(context).primary β internal fallback
This means setting the primary glow color in GlassThemeData now takes effect
on the press-interaction highlight across both bar variants, including the collapsed
logo pill, without requiring any code changes at the call site.
Affected widgets #
| Widget | Location |
|---|---|
GlassBottomBar |
TabIndicator interaction glow |
GlassSearchableBottomBar |
SearchableTabIndicator (normal + collapsed/logo state) |
GlassSearchableBottomBar |
SearchPill expanded glow |
Zero breaking changes #
Explicit interactionGlowColor parameters continue to win with highest priority.
This only changes what happens when the parameter is left null.
β¨ Feature β glowBlurRadius, glowSpreadRadius, glowOpacity on GlassGlowColors #
Three new appearance fields on GlassGlowColors give fine-grained control over the
shape of the directional press-glow across all glass widgets:
| Field | Type | Default | Effect |
|---|---|---|---|
glowBlurRadius |
double |
4.0 |
Gaussian blur sigma via MaskFilter.blur β softens the glow edge into a natural liquid-glass halo |
glowSpreadRadius |
double |
0 |
Extra circle radius as a fraction of the layer's shortest side |
glowOpacity |
double |
1 |
Master opacity multiplier (0β1) applied on top of the glow color's own alpha |
Usage #
Set them globally via GlassThemeData to affect all glass widgets at once:
GlassTheme(
data: GlassThemeData(
light: GlassThemeVariant(
glowColors: GlassGlowColors(
primary: Color(0x55FFFFFF),
glowBlurRadius: 8, // soft, diffuse halo
glowSpreadRadius: 0.15, // bleeds 15 % beyond touch radius
glowOpacity: 0.75, // 75 % of the color's own alpha
),
),
),
child: ...,
)
Or override per-widget via GlassButton.glowBlurRadius / glowSpreadRadius /
glowOpacity β widget-level values take precedence over the theme.
Defaults preserve existing visual behaviour #
glowSpreadRadius and glowOpacity default to 0 and 1 respectively,
preserving previous rendering. glowBlurRadius defaults to 4.0 β
a soft, natural halo that better fits the liquid-glass aesthetic.
MaskFilter.blur is guarded at zero so there is no GPU cost when the value
is left at 0. Set glowBlurRadius: 0 explicitly for a hard-edge disc.
Affected widgets #
All widgets that render GlassGlow consume these fields, including:
GlassButton, GlassBottomBar, GlassSearchableBottomBar
(both the tab pill and the search pill), GlassSlider, GlassSwitch.
Zero breaking changes #
Existing code that does not set these fields continues to render identically.
copyWith, ==, and hashCode all include the three new fields.
0.9.0 #
β¨ New β tabWidth on GlassBottomBar #
tabWidth is now available on both GlassBottomBar and GlassSearchableBottomBar.
Both bar variants share identical compact-sizing semantics and the same default.
API #
GlassBottomBar(
// Default (no tabWidth): expand β pill fills available space.
// tabWidth: 88.0 β iOS 26 compact sizing
tabWidth: 88.0,
...
)
tabWidth |
Behaviour | 2 tabs | 3 tabs | 4 tabs |
|---|---|---|---|---|
null (default) |
Expand β fills available space | fills bar | fills bar | fills bar |
88.0 |
Compact β iOS 26 style | 176 px | 264 px | 352 px |
The pill is automatically clamped so it never overflows its container, regardless of how many tabs are present or how narrow the screen is.
Zero breaking changes #
tabWidth defaults to null (expand) on both GlassBottomBar and
GlassSearchableBottomBar. Existing code that does not pass tabWidth
continues to behave exactly as before β the tab pill fills the bar.
Pass tabWidth: 88.0 to opt-in to iOS 26 compact sizing.
Shared infrastructure (internal) #
bar_layout_utils.dartβ new pure-Dart file containingresolveTabPillWidth. BothGlassBottomBarandSearchableBottomBarControllerdelegate to this single function, eliminating two separate inline implementations of the same arithmetic.kBottomBarGlassDefaultsβ the 9-fieldLiquidGlassSettingsconstant that was previously copy-pasted into both bar state classes is now defined once inbottom_bar_internal.dartand referenced from both locations.
Production hardening #
- Extra button pinned to trailing edge in
GlassBottomBar. Previously the extra button sat immediately adjacent to the tab pill when using compacttabWidthsizing, leaving empty space to its right. It is now always pinned to the far-right edge (usingExpanded+Align(centerRight)) to match the searchable bar's layout. ThemaxTabWarithmetic is unchanged; only the Row structure changed. Works correctly in both compact and expand modes. resolveTabPillWidthguards against negativemaxAvailablevalues (math.max(0.0, maxAvailable)before theclamp) to prevent aRangeErrorin unusual layout constraint environments.- Both constructors now assert
tabWidth == null || tabWidth > 0β passing a negative value previously produced a zero-width pill silently. - Golden regression sentinel added for
tabWidth: null(expand mode), so a layout regression in legacy behaviour is caught by the pixel-test suite.
Example #
example/lib/tab_width_demo.dart β covers both GlassBottomBar
and GlassSearchableBottomBar via a Bar variant chip, with live metrics
showing the computed pill width in real time.
0.8.4 #
CI & Tooling #
-
CI: Multi-platform test matrix. The CI pipeline now runs the full test suite on
ubuntu-latest,macos-latest, andwindows-latestacross bothstableandbetaFlutter channels. Previously onlymacos-latest / stablewas tested, which silently allowed the three Windows shader regressions shipped in 0.7.9β0.7.12. Fail-fast is disabled so all platform failures are visible in a single run. -
CI: Windows shader validation gate.
glslangValidator(the same SPIR-V compiler core Flutter uses on Windows) now runs in CI on every push and PR via theshader-validationjob. Any shader that would produce a "index expression must be constant" or "loop bounds must be compile-time constants" error is caught before it reachesmain. Previously this check only ran locally viabash scripts/validate_shaders.shon macOS. -
CI: pub.dev publish dry-run gate. A dedicated
pub-checkjob runsdart pub publish --dry-runon every push and PR. Catches missing dartdoc comments,pubspec.yamlissues, platform declaration gaps, and score regressions before they land in a release. -
CI: Coverage threshold guard (β₯ 90 % effective). The pipeline now fails if effective line coverage drops below 90 % on the stable channel. Effective coverage is computed after stripping
lib/src/renderer/*β 16 GPUCustomPainter/RenderObjectfiles that cannot execute in a headless VM (no GPU rasterizer; documented as untestable inARCHITECTURE.md). Current effective coverage is 91.8 % (4 146 / 4 514 lines). A.codecov.ymlconfig now mirrors this exclusion so the pub.dev / GitHub badge agrees with the CI gate rather than showing the raw ~81 % figure that included the untestable renderer paths. -
CI: Run concurrency cancel. Added
concurrencygroup so redundant in-progress runs on the same branch are cancelled automatically, saving CI minutes on rapid-push workflows. -
Tooling:
scripts/validate_shaders.shcross-platform update. The shader validation script now resolvesglslangValidator/glslangValidator.exeautomatically, works on Windows (Git for Windows bash), and prints correct install instructions for macOS (brew), Ubuntu (apt-get), and Windows (choco/winget). Path resolution is now robust regardless of which directory the script is called from.
GlassAdaptiveScope Diagnostics (experimental) #
-
GlassAdaptiveDiagnosticβ rich quality change event. A new immutable data class is emitted wheneverGlassAdaptiveScopechanges quality tier. It carries the full context of why the change happened:from/toquality,reason(warmupComplete,thermalDegradation,thermalRecovery,restoredFromCache,staticProbe),phase, and the P75/P95 raster timing that triggered the decision. -
GlassAdaptiveScope.onDiagnosticβ a new optional callback that receives aGlassAdaptiveDiagnosticalongside the existingonQualityChanged. The old callback is unchanged β this is purely additive. -
GlassAdaptiveScope.debugLogDiagnostics: trueβ zero-wiring diagnostic mode. Add this flag to print a structured console block on every quality change in debug builds (no-op in profile/release). Designed to lower the barrier for community threshold calibration reports:ββ π GlassAdaptiveScope βββββββββββββββββββββββββββββββββββββββββ β Change : premium β standard β Reason : warmupComplete β Phase : runtime β P75 : 14.2 ms β Frames : 10 β β π¬ Post to: github.com/sdegenaar/liquid_glass_widgets/discussions βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ -
GlassQualityChangeReasonenum β exported publicly so analytics pipelines can filter on specific event types (e.g. only logwarmupCompleteand skiprestoredFromCachenoise). -
Adapter diagnostic tracking β
GlassQualityAdapternow recordslastP75Ms,lastP95Ms,lastFramesMeasured, andlastChangeReasonbefore every quality decision so the scope can snapshot them synchronously before the asyncaddPostFrameCallbackgap.
Bug Fixes #
-
FIX: Refraction inverted on Android (Pixel 7, Mali GPU, OpenGL ES emulator). On all devices where Impeller uses the OpenGL ES backend, the liquid glass refraction effect appeared to bend inward rather than outward β content beneath the glass lens distorted toward the centre instead of away from it. The glass bottom bar, segmented control indicator, and all premium-quality glass surfaces were affected.
Root cause: OpenGL ES stores render-to-texture outputs with a bottom-left Y origin (Y increases upward), whereas Flutter's widget coordinate system uses Y-down. The shaders already flip
screenUV.yandgeometryUV.ywith1.0 β yto compensate when sampling textures. However, thedisplacementvector (inliquid_glass_final_render.frag) andedgeOffsetLogical(ininteractive_indicator.frag) were computed in Flutter's Y-down space and added directly to the Y-up UV without correcting the Y component. A positive Y displacement (outward at the bottom edge) therefore moved the sample toward the centre in UV space β the exact opposite of the intended direction.Fix: Under
#ifdef IMPELLER_TARGET_OPENGLES, negate the Y component of the displacement/offset vector before applying it to the sampled UV. This re-aligns the Y-down displacement with the Y-up UV coordinate space.The Metal (iOS/macOS) and Vulkan (Samsung S22 / Adreno / AMD Xclipse) code paths are unchanged β the fix is gated entirely by
IMPELLER_TARGET_OPENGLESand verified against both a Pixel 7 API 35 emulator and a physical Samsung Galaxy S22.
0.8.3 #
Performance & Bug Fixes #
-
GlassBottomBar/GlassSearchableBottomBarβ glass lens now correctly refracts active tab icons. Previously the selected icon layer was rendered above theAnimatedGlassIndicatorin a separate compositor layer, making it invisible to theBackdropFilter. The glass pill swept over a blank canvas, producing a flat, unrefracted active icon. Both the selected and unselected icon layers are now combined into a singleRepaintBoundaryplaced behind the glass lens, so all icon colours are physically sampled and warped by the chromatic aberration as the pill moves β matching iOS 26 behaviour. -
Performance improvement. The fix eliminates 5β9 redundant GPU compositor layers per bar render frame: the per-tab
RepaintBoundarynodes on both the selected and unselected icon rows have been removed in favour of a single shared compositor texture for the entire icon canvas. Fewer texture uploads, oneBackdropFiltersample β net improvement at 120 Hz.
0.8.2 #
Bug Fixes #
-
GlassQuality.premiumno longer crashes outside aLiquidGlassLayer. Previously caused an opaqueNull check operatorcrash. Now throws a descriptiveAssertionErrorin debug builds and falls back gracefully (renders child without glass) in release. Fix: adduseOwnLayer: trueto any standaloneGlassButtonusingpremiumquality. -
GlassBottomBar/GlassSearchableBottomBarβ repeat-tap on active tab now firesonTabSelected(#22). Previously theindex != widget.tabIndexguard silently suppressed callbacks when the user tapped the already-selected tab, making it impossible to implement scroll-to-top or refresh-on-retap patterns. The guard has been removed;onTabSelectedis now always called once per gesture lifecycle regardless of whether the tab index changes. -
GlassBottomBar/GlassSearchableBottomBarβ drag-end snaps to correct tab (#23). A coordinate-space mismatch in_onDragEndcaused the indicator to snap to the wrong tab: dragging to the centre of a 5-tab bar landed on tab 3 instead of tab 2. The fix corrects the inversion formula toi = round(relX Γ (n β 1)), which is the exact inverse of the alignment spacecomputeAlignment(i, n) = β1 + 2i/(nβ1). -
GlassBottomBar/GlassSearchableBottomBarβonTabSelectedno longer fires twice per tap.BottomBarTabItemhad its ownonTap: () => onTabSelected(i)callback that fired independently of the outerTabIndicator'sonTapDownhandler, causing every tap to callonTabSelectedtwice. The item-level callback is nownull; the outer indicator is the single source of truth for all selection events.Credit: These interaction fixes were identified and originally patched by @qinshah in PR #23. The implementation was refactored to preserve the existing jelly physics, desktop tap support, and fling-based navigation that the PR removed, and extended to cover
GlassSearchableBottomBarwith shared logic via the new internalTabDragGestureMixin.
API #
GlassSearchBarConfig.expandWhenActive(new). Controls whether the search pill expands whenisSearchActiveistrue. Defaulttrueβ no change needed for standard usage. Set tofalsefor advanced layouts (e.g. Apple Music Play Pill pattern) where the search pill should remain compact whileisSearchActivedrives a non-search transition independently.
Examples #
apple_music_demoβ added as a reference for the Play Pill pattern: a floatingGlassButton(useOwnLayer: true,GlassQuality.premium) that animates between a full-screen player and a mini-mode docked pill usingAnimatedPositioned+AnimatedOpacity, synchronized withGlassSearchableBottomBar's spring morph viaexpandWhenActive.
0.8.1 #
New Features #
GlassInteractionBehavior β precise, orthogonal control of press interactions #
A new first-class enum that independently controls the two dimensions of press
feedback on GlassBottomBar, GlassSearchableBottomBar, and GlassTextField
(as well as its derivative inputs):
| Value | Glow | Scale |
|---|---|---|
none |
β | β |
glowOnly |
β | β |
scaleOnly |
β | β |
full (default) |
β | β |
The glow is the iOS 26-style directional light spotlight that follows the touch position across the glass surface. The scale is the spring-physics size pulse on press.
// Glow only β light follows your finger, no bounce:
GlassBottomBar(
interactionBehavior: GlassInteractionBehavior.glowOnly,
...
)
// Scale only β spring bounce, no glow:
GlassSearchableBottomBar(
interactionBehavior: GlassInteractionBehavior.scaleOnly,
pressScale: 1.06,
...
)
// Disable both for a completely static bar:
GlassBottomBar(
interactionBehavior: GlassInteractionBehavior.none,
...
)
Zero overhead when disabled. When interactionBehavior suppresses glow (none
or scaleOnly), the GlassGlow sensor widget is removed from the tree entirely β
saving 3 widget allocations and 3 RenderBox nodes per tab indicator per frame.
Scale is resolved at build time to a scalar 1.0 with no animation controller
overhang.
New parameters on GlassBottomBar, GlassSearchableBottomBar, and GlassTextField #
GlassTextField now shares the same interactionBehavior API as the bar-family
widgets. The scale dimension maps onto the subtle press-bounce animation
(field squishes slightly when pressed down); the glow dimension is the directional
spotlight that tracks touch position across the glass surface.
GlassPasswordField and GlassTextArea delegate to GlassTextField and inherit
the new parameter automatically.
| Parameter | Widget(s) | Type | Default |
|---|---|---|---|
interactionBehavior |
All three | GlassInteractionBehavior |
.full |
pressScale |
Bar widgets / Inputs | double |
1.04 (bars) / 1.03 (inputs) |
interactionGlowColor |
Bar widgets | Color? |
null (theme default) |
glowColor |
GlassTextField |
Color? |
null (~12% white) |
interactionGlowRadius |
Bar widgets | double |
1.5 |
glowRadius |
GlassTextField |
double |
1.5 |
All defaults preserve existing 0.8.0 visual behaviour β no migration required.
Migration from enableGlow / enableFocusAnimation
GlassTextField.enableGlow and GlassTextField.enableFocusAnimation have been
replaced by interactionBehavior. The mapping is direct:
// Before (0.8.0):
GlassTextField(enableGlow: false, enableFocusAnimation: false)
// After (0.8.1):
GlassTextField(interactionBehavior: GlassInteractionBehavior.none)
// Before: glow only
GlassTextField(enableGlow: true, enableFocusAnimation: false)
// After:
GlassTextField(interactionBehavior: GlassInteractionBehavior.glowOnly)
Bug Fixes #
-
FIX:
SearchPillwas silently ignoringinteractionBehavior. TheinteractionGlowColorparameter was never passed to theSearchPillconstructor, so the search pill always rendered with a visible glow regardless of the bar'sinteractionBehaviorsetting. The glow was hardcoded toColor(0x1FFFFFFF)even whenbehavior = none. -
FIX:
SearchPillStatehad no glow short-circuit on the expanded pill path. Added_wrapWithGlowhelper (matching the pattern already inTabIndicatorStateandSearchableTabIndicatorState) to skipGlassGlowallocation when glow is suppressed.
0.8.0 #
New Features #
GlassAdaptiveScope (experimental) β automatic runtime quality adaptation #
A new scope widget that automatically adjusts GlassQuality for its subtree
based on real raster performance observed from SchedulerBinding frame timings.
Handles the three device scenarios that are impossible to test on a developer
device:
- Broken / slow shader drivers (e.g. Pixel 4a, Galaxy A22 class): detected
synchronously at startup via
ImageFilter.isShaderFilterSupportedand capped immediately tominimal. - Warm-up jank ("wrong quality at startup"): resolved by a ~180-frame benchmark that measures real P75 raster durations and sets the initial quality tier before the user notices.
- Thermal throttling ("fine at launch, janky after 10 minutes"): detected and corrected by a continuous runtime hysteresis engine.
Three-phase adaptation:
| Phase | Trigger | Action |
|---|---|---|
| Phase 1 β Static probe | Mount | Forces minimal on unsupported hardware; caps at standard on web |
| Phase 2 β Warm-up | First ~180 frames (~3 s at 60 fps) | Sets initial quality from real P75 raster durations |
| Phase 3 β Runtime hysteresis | Ongoing | Degrades after 3 bad windows; recovers after 10 good windows (8 s cooldown) |
The scope acts as a quality ceiling β widgets with an explicit quality:
parameter are unaffected. The ceiling is enforced by
GlassThemeHelpers.resolveQuality, which reads GlassAdaptiveScopeData from
the nearest ancestor scope.
// Per-screen control:
GlassAdaptiveScope(
child: Scaffold(...),
)
// Advanced β conservative start for fragmented Android market:
GlassAdaptiveScope(
initialQuality: GlassQuality.standard, // earn your way up to premium
allowStepUp: true,
onQualityChanged: (from, to) => analytics.log('glass_quality_changed'),
child: child,
)
Experimental in 0.8.0.
GlassAdaptiveScopeandGlassAdaptiveScopeConfigare annotated@experimental. The three-phase adaptation logic is architecturally sound and fully tested, but the Phase 2 timing thresholds (P75 < 12 ms β premium, 12β20 ms β standard, > 20 ms β minimal) have been validated by reasoning, not yet by broad real-device data across the Android fragmentation landscape.How to enable it:
LiquidGlassWidgets.wrap(myApp, adaptiveQuality: true)(opt-in, defaultfalse).If you observe unexpected behaviour β quality too low on a mid-range device, or stuck at
standardon a flagship β please file an issue with your device model and raster timings from Flutter DevTools. Your data will be used to tune the thresholds for a future release.
GlassAdaptiveScopeConfig (experimental) β portable configuration value object #
Bundles all GlassAdaptiveScope parameters into a single const-constructible,
equality-comparable value object. Used by LiquidGlassWidgets.wrap() and useful
for passing scope configuration through APIs that cannot accept widget parameters
directly.
const config = GlassAdaptiveScopeConfig(
initialQuality: GlassQuality.standard,
allowStepUp: true,
targetFrameMs: 8, // 120 Hz ProMotion
);
API Refactor β initialize() and wrap() separation #
The responsibilities of initialize() and wrap() have been clarified and
made consistent with the broader Flutter ecosystem (cf. easy_localization,
MaterialApp):
| Method | Responsibility |
|---|---|
initialize() |
Async platform / engine setup only (shader prewarming, Impeller pipeline, debug monitor) |
wrap() |
Widget-tree composition and all behavioral configuration |
wrap() β new parameters #
runApp(LiquidGlassWidgets.wrap(
const MyApp(),
respectSystemAccessibility: false, // moved from initialize()
adaptiveQuality: true, // new β inserts GlassAdaptiveScope
adaptiveConfig: GlassAdaptiveScopeConfig(
initialQuality: GlassQuality.standard,
allowStepUp: true,
),
));
Scope nesting order inserted by wrap() #
GlassAdaptiveScope β GlassBackdropScope β child
Breaking Changes #
initialize(respectSystemAccessibility:) removed #
respectSystemAccessibility has moved from initialize() to wrap().
Migration (one-line change):
// Before (0.7.x):
await LiquidGlassWidgets.initialize(respectSystemAccessibility: false);
runApp(LiquidGlassWidgets.wrap(const MyApp()));
// After (0.8.0):
await LiquidGlassWidgets.initialize();
runApp(LiquidGlassWidgets.wrap(const MyApp(), respectSystemAccessibility: false));
The LiquidGlassWidgets.respectSystemAccessibility getter and setter remain
available as an escape hatch for tests and advanced runtime overrides. In
production code, set it through wrap().
Bug Fixes #
Glass invisible on white / light backgrounds (transparency regression) #
-
FIX: Standalone glass widgets (
GlassButton,GlassContainer,GlassTextField,GlassCard, and all widgets that delegate to them) rendered with zero opacity on light backgrounds when no explicitsettings:were provided. Root cause: these widgets fell through toInheritedLiquidGlass.ofOrDefault(), which returnsLiquidGlassSettings()β a default withglassColor: Color(0x00FFFFFF)(alpha = 0). The lightweight shader computesbody tint = glassColor.alpha Γ 0.15, so0 Γ 0.15 = 0β the glass body was literally transparent regardless ofthicknessorblur.Fix: Replaced all
InheritedLiquidGlass.ofOrDefault()call sites with the newGlassThemeHelpers.resolveSettings(), which traverses the full 5-level priority chain:- Widget-level
settings:parameter (explicit wins) InheritedLiquidGlassβ nearest parentAdaptiveLiquidGlassLayerLiquidGlassWidgets.globalSettingsβ app-level overrideGlassThemeDataβ brightness-aware theme variant (light / dark)LiquidGlassSettings()β absolute last resort
Standalone widgets now correctly resolve to the theme's
glassColorand are always visible out of the box. - Widget-level
Light theme defaults rebalanced #
-
TWEAK:
GlassThemeVariant.lightupdated for an icy-frosted aesthetic that reads clearly on white backgrounds:Property Before After blur10.0 6.0 glassColor0x73FFFFFF(45% neutral white)0x4AD2DCF0(~29% cool blue-white)chromaticAberration0.1 0.3 thickness16.0 20.0 lightIntensity1.0 1.2 The cool blue-white tint (
D2DCF0) matches the icy tone of iOS 26 frosted glass. Blur 6 gives visible background diffusion without obscuring content.
API #
GlassBackdropScope now exported from the main barrel #
-
FIX:
GlassBackdropScopewas missing fromliquid_glass_widgets.dart. Consumers had to use the internal pathpackage:liquid_glass_widgets/widgets/shared/glass_backdrop_scope.dart, which is fragile and undocumented. It is now a first-class public export.Migration β update any direct internal imports:
// Before (workaround, fragile): import 'package:liquid_glass_widgets/widgets/shared/glass_backdrop_scope.dart'; // After (correct): import 'package:liquid_glass_widgets/liquid_glass_widgets.dart'; -
CHORE: add CI and Codecov badges.
0.7.16 #
Bug Fixes #
- FIX:
GlassSearchableBottomBarβ memory leak whencontrollerwas swapped at runtime. The old controller's listener was never removed before attaching to the new controller. Now correctly removed indidUpdateWidget. - FIX:
DraggableIndicatorPhysicsβ velocity NaN/Infinity guard. A zero-size render box (e.g. during widget tree warm-up) could produceInfinityorNaNforvelocityX, which propagated into the spring physics and caused erratic snapping. Now clamped to 0 when the box has no size.
Refactor (zero breaking changes) #
- REFACTOR: Extracted
GlassSearchBarConfigfromglass_searchable_bottom_bar.dartinto a dedicated filelib/widgets/surfaces/shared/glass_search_bar_config.dart. Resolves a circular import between the public widget and its internal sub-widgets.GlassSearchBarConfigis re-exported from the barrel file β no consumer-facing API change. - REFACTOR: Extracted
_TabIndicator/_TabIndicatorStatefromglass_bottom_bar.dartintoshared/bottom_bar_internal.dartasTabIndicator/TabIndicatorState(package-internal, not exported). Follows the same pattern used forGlassSearchableBottomBar.glass_bottom_bar.dartreduced from 1,406 β ~895 lines. - REFACTOR: Extracted
_TabBarContent,_TabBarContentState, and_TabItemfromglass_tab_bar.dartintoshared/tab_bar_internal.dart.glass_tab_bar.dartreduced from 728 β ~310 lines. Architecture is now consistent across all bar-family widgets.
Test Coverage #
- TEST: Reached 91.85% effective coverage (up from 89.6% in 0.7.15 β excluding GPU/shader renderer paths that are physically untestable in a headless VM). Total: 1,031 tests, all passing, 0 analyzer warnings.
- TEST: New
test/widgets/surfaces/glass_bottom_bar_drag_test.dartβ 7 regression tests covering_onDragEndphysics snapping,_onDragCancel(mid-drag and no-drag), slow drags, fast flings, and full-bar sweeps. These paths are the highest-risk regressions in navigation UX.
0.7.15 #
Bug Fixes #
- FIX:
lib/theme/glass_theme_settings.dartwas accidentally omitted from version control in 0.7.14. All consumers ofGlassThemeSettingsreceived a compile error (type 'GlassThemeSettings' is not a subtype). This release commits the missing file. No API change βGlassThemeSettingswas already exported fromliquid_glass_widgets.dart. - FIX:
GlassPerformanceMonitor._emitWarningβ division-by-zero crash whenrasterBudgetwas sub-millisecond (< 1 ms). Protected with amax(1, ...)guard.
Refactor (zero breaking changes) #
- REFACTOR: Consolidated 18 quality-resolution chains (
widgetQuality ?? inherited?.quality ?? themeData.qualityFor(context) ?? GlassQuality.standard) into a single canonical helper:GlassThemeHelpers.resolveQuality(context, widgetQuality: ..., fallback: ...). Surface widgets (GlassAppBar,GlassToolbar,GlassBottomBar,GlassSearchableBottomBar,GlassSideBar) passfallback: GlassQuality.premiumto preserve their documented defaults. All other widgets default toGlassQuality.standard. - REFACTOR: Extracted
_buildIconShadowsfromBottomBarTabItemto a@visibleForTestingtop-level functionbuildIconShadows(...)inbottom_bar_internal.dart. No behaviour change β enables isolated unit testing of the shadow-outline geometry.
Test Coverage #
- TEST: Reached 90%+ effective test coverage (90.15% β excluding
src/rendererGPU/shader layer where headless simulation is impossible). Total: 949 tests, all passing. - TEST: New
test/theme/glass_theme_helpers_test.dartβ 5 widget tests covering all 4 priority levels ofGlassThemeHelpers.resolveQuality(). - TEST: New
test/widgets/surfaces/build_icon_shadows_test.dartβ 6 unit tests coveringbuildIconShadows(): null thickness, active-icon suppression, shadow count, 45Β° offset math, and color propagation. - TEST: Added
test/theme/,test/renderer/,test/types/,test/constants/,test/utils/, andtest/widgets/test suites (committed for the first time β these were written during the 0.7.13β0.7.14 coverage push but never staged).
0.7.14 #
Bug Fixes #
- FIX:
GlassSearchableBottomBarβextraButtonnow fades out smoothly when search activates instead of being visually clipped/shrunk between the collapsing tab pill and the expanding search pill. Layout space is still reserved during the morph (no pills jump), only the visual opacity transitions. Taps on the extra button are also correctly blocked while hidden. Fades in when search closes. - FIX:
GlassSearchableBottomBarβ spring morph animations no longer produce a visible jump when reversing direction. Previously the three spring controllers (tabW,searchLeft,searchW) were each started in separateaddPostFrameCallbackcalls, introducing a 1-frame desync at reversal. All three are now started in a single batched callback, so the morph is perfectly synchronized in both directions. - FIX: Indicator fade animation in
GlassBottomBar/GlassSearchableBottomBarβ replacedOpacitywrapper withLiquidGlassSettings.visibilityfading. Wrapping aBackdropFilterinOpacitycomposites into an offscreen buffer, breaking backdrop sampling and causing the indicator to snap in/out instead of fading. Thevisibilitypath is a single GPU pass β no offscreen buffer β improving drag animation performance and working uniformly for allblurvalues. - FIX:
GlassBottomBar,GlassSearchableBottomBar,GlassAppBar,GlassToolbar, andGlassSideBarresolved toGlassQuality.standardinstead of their documentedGlassQuality.premiumdefault. Fixed by settingquality: nullin the built-in light/dark variants so each widget's documented default is respected. - FIX: Setting any property in
GlassThemeVariant.settingssilently zeroed out all unset properties (e.g. setting onlythickness: 50also resetglassColorto fully transparent). Fixed by introducingGlassThemeSettings: a parallel class with all-nullable fields that merges onto each widget's own defaults. Only the fields you explicitly set are applied; everything else inherits from the widget.GlassThemeVariant.settingsnow acceptsGlassThemeSettings?. - FIX:
GlassSearchableBottomBarβ multiple layout-math regressions in the morph animation corrected:- Reserved layout width now correctly scales to
min(size, searchBarHeight)during search, eliminating the bloated gap whensearchBarHeight < barHeight. - Extra button rendered width now matches the layout reserve (
extraTargetW), preventing a 14 px overflow into the search pill whensearchBarHeight < barHeight. - Restored
+ widget.spacingintargetSearchLeft; an erroneoustabToNextGapvariable had suppressed the gap between the tab pill and search pill when no extra button was present. collapseOnSearchFocusnow exclusively controls visibility/opacity β it no longer affects layout geometry. Toggling it mid-animation no longer triggers the spring or causes the button to jump inside the collapsed tab circle.
- Reserved layout width now correctly scales to
- FIX:
BottomBarTabItemβ removed a fixedvertical: 4padding wrapping the tab column. The padding consumed constraint space beforeFittedBoxcould scale, causing a 2 pxRenderFlexoverflow when the bar morphed tosearchBarHeight.
New #
- NEW:
GlassThemeSettingsβ a partial settings type for use inGlassThemeVariant. Accepts the same parameters asLiquidGlassSettingsbut all are nullable. Only non-null fields override the target widget's defaults, enabling precise single-property theme overrides without disturbing others. - NEW:
GlassTabPillAnchorenum +GlassSearchableBottomBar.tabPillAnchorβ controls how the tab pill is anchored during the morph animation.GlassTabPillAnchor.start(default) preserves existing left-anchor behaviour.GlassTabPillAnchor.centermakes both edges collapse symmetrically from the pill's centre for a more balanced look. The search pill position adjusts automatically in center mode. - NEW:
GlassSearchBarConfig.showsCancelButtonnow defaults totrue. Tapping the dismiss pill unfocuses the keyboard and collapses search, matching the system-level behaviour seen across iOS apps (Weather, App Store, Apple News). PassshowsCancelButton: falseto opt out. - NEW:
GlassSearchBarConfig.collapsedTabWidthis now nullable. When omitted, the collapsed tab pill automatically matchesGlassSearchableBottomBar.searchBarHeight, ensuring it morphs into a geometric circle with no leftover horizontal margin. Pass an explicit value to override. - NEW:
GlassBottomBarExtraButton.collapseOnSearchFocus(defaulttrue) β controls whether the extra button collapses when the search field is focused. Whentrue, the button fades out and its layout space spring-animates to zero, giving the search input the full available width (matching native iOS behaviour). Whenfalse, the button remains fully visible and tappable alongside the search input β useful for contextually relevant actions like a Filter button that applies to search results. - EXAMPLE:
searchable_bar_repro.dartadded to the example app β exercisesGlassSearchableBottomBaredge cases (extra-button fade, spring desync, bar-height scale, dismiss pill) in isolation. Run standalone:flutter run -t example/lib/searchable_bar_repro.dart.
0.7.13 #
New β GlassQuality.minimal #
-
FEAT:
GlassQuality.minimalβ third quality tier: a crisp frosted glass surface with zero custom fragment shader execution on any platform. UsesBackdropFilterblur- Rec. 709 saturation matrix + a light-angle specular rim stroke. No refraction warping or chromatic aberration β a deliberately flat, clean aesthetic that looks excellent on any background and never adds GPU shader cost.
Two distinct use cases:
Device fallback β for hardware where even [standard] is too heavy: very old Android devices with limited shader driver support, or any device where
ImageFilter.isShaderFilterSupportedreturnsfalse.GPU budget management β for shader-dense screens: use [minimal] for background panels, list cards, and decorative containers while keeping [standard] or [premium] on the focal element. A screen with 15 glass list cards running [minimal] fires zero shader invocations during scroll β only
BackdropFiltercompositing.AdaptiveGlass( quality: GlassQuality.minimal, child: child, ) -
FEAT:
GlassThemeVariant.minimalβ static preset that applies.minimalquality globally viaGlassThemeData:GlassTheme( data: GlassThemeData( light: GlassThemeVariant.minimal, dark: GlassThemeVariant.minimal, ), child: child, )
New β GlassPerformanceMonitor #
-
FEAT: Debug/profile-only performance monitor that watches raster frame durations while
GlassQuality.premiumsurfaces are active. When frames exceed the GPU budget for 60 consecutive frames, a singleFlutterErroris emitted with actionable guidance (specific widget parameters, device compatibility notes, and alternative quality tiers).Zero production overhead β the monitor never registers a callback in release builds. Enabled by default in debug/profile builds via
LiquidGlassWidgets.initialize():// Default: auto-enabled in debug/profile, zero-cost in release await LiquidGlassWidgets.initialize(); // Opt out: await LiquidGlassWidgets.initialize(enablePerformanceMonitor: false); // Custom thresholds (advanced): GlassPerformanceMonitor.rasterBudget = const Duration(microseconds: 8333); // 120 fps GlassPerformanceMonitor.sustainedFrameThreshold = 120; // 2 seconds at 60 fpsThe monitor correctly attributes slowdowns to premium glass by counting active
GlassQuality.premiumsurfaces. It stays silent when no premium widgets are mounted, avoiding false positives from other parts of the app.
0.7.12 #
Bug Fixes #
-
FIX: Interactive blend-group stretch asymmetry β
LiquidStretchnow expands geometry symmetrically from the widget centre, fixing the left-leans-in / right-resists imbalance during touch-drag on button groups. -
FIX: Erroneous highlight bias β removed a legacy shader hack that skewed surface normals horizontally. Normals are now derived accurately from the SDF gradient, eliminating optical hotspots that made straight groups look crooked.
-
PERF: Zero-jitter animation bounds β geometry texture mapping is now strictly bound to the physical size it was rasterised for, stopping frame-lag wobble when buttons change scale during interactive drags.
-
FIX: Theme quality cascade β audited 15+ widgets (
GlassBottomBar,GlassSwitch,GlassTextField, and others) that were silently overriding the globalGlassThemeVariantquality setting withGlassQuality.premium. All widgets now correctly inherit and respect the global quality profile, protecting frame rate and thermal limits on older devices (e.g. iPhone 12 and below). -
FIX: Zero-thickness blur β setting
thickness: 0no longer makes the glass fully transparent. Backdrop blur now renders correctly on glass surfaces regardless of geometric thickness, restoring backward-compatible behaviour. -
FEAT:
GlassSearchBarConfig.focusNodeβ optionalFocusNodeforGlassSearchBarConfig. When provided, the caller has full programmatic focus control (requestFocus(),unfocus(),addListener()) independent ofautoFocusOnExpand. The widget adopts the caller-provided node without disposing it (caller owns lifecycle), matching Flutter's ownTextField.focusNodecontract. -
FEAT:
GlassSearchBar.focusNodeβ sameFocusNodesupport added to the standaloneGlassSearchBarfor consistency.GlassTextFieldalready had this. -
FIX:
ExtraButtonPositionβ new enum onGlassBottomBarExtraButton. Set.position = ExtraButtonPosition.afterSearchto pin the extra button to the right of the search pill. Spring geometry calculations reserve space correctly to preventRenderFlexoverflows during expand/collapse. Default isExtraButtonPosition.beforeSearchβ fully backwards-compatible. -
FIX: Windows / SkSL shader compilation β eliminated all dynamic array index expressions from
sdf.glsl. The previousgetShapeSDFFromArray(int index)computed offsets at runtime, which SkSL/glslang on Windows rejects with "index expression must be constant". Replaced with literal-indexedsdf0()β¦sdf15()helpers and a fully-unrolledsceneSDFfor 1β16 shapes.MAX_SHAPESstays 16; no API or visual change. -
TOOLING:
scripts/validate_shaders.shβ macOS script that validates all shaders against Windows/SkSL compiler rules usingglslangValidator. Runbash scripts/validate_shaders.shbefore releasing. Requiresbrew install glslang(one-time).
0.7.11 #
Bug Fixes #
-
FIX: Windows/Android build failure β three shader compilation errors on the SPIR-V/glslang path: loop bounds must be compile-time constants;
dFdx/dFdyon a scalarfloatis rejected by glslang (geometry shader now uses#ifdef IMPELLER_TARGET_METALto keep hardware derivatives on iOS/macOS and fall back to Β±0.5 px finite differences on Vulkan/OpenGL ES); global non-constant initialisers at file scope inliquid_glass_final_render.fragmoved intomain(). -
FIX: Blend-group asymmetry β the liquid-glass merge neck between grouped buttons leaned toward the left button. Fixed with a bidirectional smooth-union pass (LβR + RβL, averaged 50/50) that cancels the directional bias exactly.
0.7.10 #
Bug Fixes #
- FIX: Windows build (
flutter build windows) β two shader issues fatal on SkSL/glslang but silently accepted on Metal:no match for min(int, int)(replaced with a ternary) and global non-constant initialisers (moved intomain()). No visual change on any platform.
0.7.9 #
Bug Fixes #
- FIX: Windows build failure β
uShapeData[MAX_SHAPES * 6]was passed as a by-value function parameter, which glslang rejects. Fixed by accessing it as a global uniform. No visual change.
Tweaks #
- TWEAK:
GlassSearchableBottomBariOS 26 Apple News parity β animated inlineΓclear button replaces microphone when text is present; simplified hit-testing layout replacesOverlaylayers; guaranteed GPU liquid-glass merging between the search and dismiss pills in a single shader pass.
0.7.8 #
Tweaks #
- TWEAK:
GlassThemeVariant.lightnow defaults to a cool-tintedglassColor(Color(0x32D2DCF0)), strongerrefractiveIndex, and boostedambientStrengthto ensure premium specular rendering and visible refraction on flat white backgrounds.
Examples #
- Apple News demo β replaced
Image.networkcalls with pre-sized bundled assets (example/assets/news_images/) to fix Impeller GPU command-buffer overflow on iOS 26 physical devices. - Apple News demo β
collapsedLogoBuildernow mirrors the active tab icon instead of a static badge.
0.7.7 #
Refactor #
- Internal: Removed
GlassIndicatorTapMixinand migratedGlassTabBarandGlassSegmentedControlfully to rawListenerpointer events, matchingGlassBottomBar's robust drag-cancel and press-and-hold handling. No API change.
0.7.6 #
Bug Fixes #
-
FIX:
LiquidGlassBlendGroupasymmetry β left buttons attracted their neighbours more strongly than right buttons in groups of 3+. Fixed with a bidirectional smooth-union pass (LβR + RβL, averaged 50/50). Two-shape groups are mathematically identical to before. -
FIX:
GlassButtonGroupβ glass effect could bleed as a dark rectangle on Impeller withGlassQuality.premiumanduseOwnLayer: true. AClipRRect(antiAlias)now hard-clips the bleed at the superellipse boundary without forcing a quality downgrade.
0.7.5 #
Bug Fixes #
-
FIX:
GlassBottomBar/GlassSearchableBottomBarβ addedHitTestBehavior.opaqueto the rootGestureDetectorso the full bar height reliably consumes pointer events on simulator and desktop. -
FIX:
GlassSearchableBottomBarβ keyboard no longer flickers on physical devices; focus is requested after the expansion animation completes. -
FIX:
GlassSearchableBottomBarβ dead zone at expanded search pill edges resolved; the full glass surface now claims taps and routes them to the search field.
New β GlassSearchBarConfig parameters #
Seven new parameters (all backwards-compatible):
| Parameter | Type | Default | Description |
|---|---|---|---|
autoFocusOnExpand |
bool |
false |
Keyboard opens automatically on expand. |
trailingBuilder |
WidgetBuilder? |
null |
Replaces the mic icon with any custom widget. |
textInputAction |
TextInputAction? |
null |
Keyboard action key (search, done, go, β¦). |
keyboardType |
TextInputType? |
null |
Keyboard layout (url, emailAddress, β¦). |
autocorrect |
bool |
true |
Disable for codes, usernames, etc. |
enableSuggestions |
bool |
true |
Controls QuickType bar on iOS. |
onTapOutside |
TapRegionCallback? |
null |
Called when user taps outside the field. |
0.7.4 #
New Components #
GlassSearchableBottomBarβGlassBottomBarwith a morphing search pill that shares the sameAdaptiveLiquidGlassLayeras the tab pill, producing iOS 26 liquid-merge blending. WhenisSearchActiveistruethe tab pill collapses and the search pill expands via spring animation. Configured viaGlassSearchBarConfig.
Examples #
- Apple News demo (
example/lib/apple_news/apple_news_demo.dart) β iOS 26 Apple News replica showcasingGlassSearchableBottomBar.
Visual Fixes #
- FIX: Default glow color on press changed from iOS system blue to a brightness-adaptive neutral white (~35% light / ~22% dark), matching iOS 26 glass press behaviour.
0.7.3 #
Performance #
- PERF: Deleted unused
rotate2d()fromrender.glslβ it was compiled into every shader binary but never called. - PERF: Eliminated a redundant
normalize()ininteractive_indicator.fragby reusing an already-computed length. - PERF: Removed a no-op
canvas.save()/canvas.restore()pair inGlassGlowpaint.
Bug Fixes #
- FIX:
GlassGlowtracking β glow gradient is now correctly recreated each frame whenglowOffsetchanges, fixing the spotlight freezing at its initial position. - FIX: Glow on Skia/Web β
LightweightLiquidGlassnow wraps inGlassGlowLayer, giving the Skia path the same light-follows-touch behaviour as Impeller. - FIX: Glow on first touch β spotlight now appears immediately at the tap position instead of sliding in from the widget's top-left corner.
- FIX: Glow tracking inside button groups β converted from widget-local to global coordinates so the spotlight correctly follows touches regardless of nesting depth.
- FIX: Glow radius on wide buttons β switched from
shortestSidetoβ(width Γ height)so the spotlight scales proportionally to the button area.
0.7.2 #
Performance & Polish #
- PERF: Lightweight shader (
lightweight_glass.frag) β reduced ALU instruction count ~10β15 ops per fragment; restored thenormalZFresnel ramp tosqrt(1 β dot(n,n)). - PERF: Impeller final render shader β eliminated
length()/normalize()from anisotropic specular; madegetHeight()fully branchless; collapsed fourstep()multiplications into one. - PERF: Dart side β cached light direction trig in
LiquidGlassRenderObject(only recomputed whenlightAnglechanges); changedGlassGroupLink.shapeEntriesfromListtoIterableto eliminate per-frame heap allocation. - FIX: Adjusted
GlassBottomBar,GlassTabBar, andGlassSegmentedControlspring from 500msbouncySpringto 350mssnappySpring, matching iOS 26 segment-indicator physics.
0.7.1 #
Bug Fixes #
- FIX:
GlassBottomBar,GlassTabBar,GlassSegmentedControlβ rapid taps no longer prematurely snap the indicator, killing spring physics. Removed pixel-snapping fromonHorizontalDragDownso taps correctly use spatial distance for the iOS 26 jump animation.
0.7.0 #
New Components #
GlassDividerβ iOS 26-style hairline separator, horizontal and vertical. Theme-adaptive opacity (dark: 20% white / light: 10% black).GlassListTileβ iOS 26 Settings-style row with leading icon, title, subtitle, trailing widget, and automatic grouped dividers. Use inside a zero-paddingGlassCard. Convenience constants:GlassListTile.chevron,GlassListTile.infoButton.GlassStepperβ iOS 26UIStepperequivalent. Compactβ/+glass pill with auto-repeat on hold,min/maxclamping,wrapscycling, fractionalstep, and haptic feedback.GlassWizard+GlassWizardStepβ multi-step flow with numbered indicators, checkmarks, and expandable step content.
Accessibility #
GlassAccessibilityScopeβ reads platform Reduce Motion and Reduce Transparency preferences and propagates them to all glass widgets in its subtree:- Reduce Motion: spring animations snap instantly.
- Reduce Transparency: replaces the full glass shader pipeline with a plain
BackdropFilter(blur)+ frosted container.
- Semantics updated across all remaining widgets to match iOS
UIAccessibilityconventions.
Performance #
- PERF:
GlassSpecularSharpnessenum β replacespow(lightCatch, exponent)(two transcendentals per fragment) with a pure squaring chain inlightweight_glass.frag. Zero transcendentals. Default:.medium. - PERF:
pow(x, 1.5)βxΒ·βxin Impeller edge lighting βsqrt()is a single hardware SFU instruction. - PERF: Anisotropic specular and Fresnel rim brightening ported from the Impeller path to
lightweight_glass.frag, closing the largest visual gap between rendering paths. - PERF: Content-adaptive glass strength β intensity auto-adjusts based on backdrop luminance on Impeller, or
MediaQuery.platformBrightnesson Skia/Web.
Developer Experience #
GlassRefractionSourceβ renamed fromLiquidGlassBackgroundto better reflect its role.LiquidGlassBackgroundremains as a deprecatedtypedef(removed in 1.0.0).- Synchronous background capture β rebuilt using
boundary.toImageSync()on native (zero CPUβGPU readback) and asynctoImage()on web.
0.6.1 #
Visual Quality #
- FIX: True surface normal storage in geometry texture β the geometry pass now stores the SDF-gradient-derived surface normal instead of the refraction displacement vector. The render shader decodes and recomputes displacement via
refract(). Specular highlights on blended glass shapes (e.g. two overlapping pills) now correctly follow true surface curvature rather than the refraction direction. Single-shape surfaces are visually identical to 0.6.0. - FIX: Anisotropic specular highlights (Impeller) β specular lobe stretched 20% along the surface tangent, producing the horizontal oval highlight that matches iOS 26.
- FIX: Fresnel edge luminosity ramp (Impeller) β gentle brightness ramp at grazing angles matching iOS 26's centre-to-edge luminosity gradient.
- FIX: Luminosity-preserving glass tint in lightweight shader β replaced additive tint with the same
applyGlassColor()model as the Impeller path: achromatic glass lifts toward white, chromatic glass shifts hue while preserving luminance.
Performance #
- PERF: Branchless
smoothUnionβ eliminated a conditional branch that caused warp divergence when glass shapes transition between merged and separate. - PERF:
if/else ifdispatch in shape SDF β GPU now short-circuits after the first type match; default changed to0.0for a clearly visible failure mode. - PERF: Single texture fetch when chromatic aberration is disabled β
interactive_indicator.fragpreviously sampled the background three times unconditionally; 66% fewer texture reads in the common case. - PERF: Flat-interior early-exit in final render shader β pixels where
normalXY β 0skiprefract()and all texture samples, replaced with a single background sample. Lossless.
0.6.0 #
Breaking Changes #
LiquidGlassLayer.useBackdropGroupremoved. Glass layers now automatically detect aBackdropGroupancestor. RemoveuseBackdropGroup: truefrom anyLiquidGlassLayer(...)calls.
New Features #
LiquidGlassWidgets.wrap()β wraps your app in aGlassBackdropScopein one line:runApp(LiquidGlassWidgets.wrap(const MyApp()));GlassMotionScopeβ drives glass specular angle from anyStream<double>(e.g. device gyroscope). No new dependencies required.
Performance #
- PERF:
GlassBackdropScopeauto-activation β glass layers automatically share a single GPU backdrop capture when a scope ancestor is present. - PERF: Local-space geometry rasterization β geometry texture cached until pill size or shape changes, eliminating per-frame rebuilds during animation.
- PERF: Shader UV bounds check β discards fragments where geometry UV falls outside
[0, 1], preventing the thin "protruding line" artifact during jelly-physics expansion.
Visual #
- FIX: Refraction UV β uses
uSizeuniform (always valid on first frame) instead oftextureSize()which returns(0,0)on the first frame in Impeller. - FIX:
precision highp floatin final render shader (wasmediump, risking colour banding on mobile). - FIX: iOS 26 glass tint model β preserves backdrop luminance while shifting chroma. Replaces Photoshop Overlay mode.
- FIX: Leading-dot rim artifact β
x / (1 + x)soft-clamping on highlight intensity prevents bright corner artifact during drag. - FIX: Impeller indicator clipping β jelly physics animations no longer clip at the static bounding box (
clipExpansionparameter added). - FIX: Web & WASM β removed
dart:ioimports from shader resolution logic.
Dependencies #
- Removed
motordependency β replaced with self-containedglass_spring.dart. Zero third-party runtime dependencies beyond the Flutter SDK.
0.5.0 #
Breaking Changes #
LiquidGlass removed from the public API.
It was inadvertently exposed and silently renders nothing on Skia/Web. Use AdaptiveGlass instead:
// Before
LiquidGlass(settings: LiquidGlassSettings(...), child: ...)
// After
AdaptiveGlass(settings: LiquidGlassSettings(...), child: ...)
LiquidGlassLayer, LiquidGlassBlendGroup, LiquidGlassSettings, LiquidShape, GlassGlow, and debugPaintLiquidGlassGeometry remain public.
New Features #
GlassBackdropScopeβ halves GPU blur capture cost when multiple glass surfaces are on screen simultaneously. Wrap yourMaterialApporScaffoldto activate:
GlassBackdropScope(
child: MaterialApp(
home: Scaffold(
appBar: GlassAppBar(...),
bottomNavigationBar: GlassBottomBar(...),
),
),
)
Renderer #
The renderer from liquid_glass_renderer (whynotmake.it, MIT) is now vendored directly, giving full control over the rendering pipeline with no user-facing API changes.
0.4.1 #
Bug Fixes #
- FIX:
GlassBottomBarand other surfaces now correctly respond to dynamicglassSettingschanges onGlassQuality.standardβAdaptiveGlassin grouped mode now inherits settings fromInheritedLiquidGlassinstead of using empty defaults. - FIX: Luminance-aware ambient floor for white glass on
GlassQuality.standardβ high-opacity white glass no longer renders as dark grey.
New #
- FEAT:
GlassBottomBar.iconLabelSpacingβ configurable vertical gap between tab icon and label (default:4.0). Thanks @baneizalfe (#11).
Breaking Changes #
Library-wide IconData β Widget API migration. All icon parameters now accept any Widget:
// Before
GlassButton(icon: CupertinoIcons.heart, onTap: () {})
// After
GlassButton(icon: Icon(CupertinoIcons.heart), onTap: () {})
// Or any custom widget:
GlassButton(icon: SvgPicture.asset('assets/heart.svg'), onTap: () {})
GlassBottomBarTab.selectedIcon renamed to activeIcon to match Flutter's BottomNavigationBarItem convention.
0.4.0 #
New Components #
GlassMenu/GlassMenuItem/GlassPullDownButtonβ iOS 26 morphing context menu with spring physics and position-aware expansion.GlassButtonGroupβ joined-style container for related actions (e.g. Bold/Italic/Underline toolbar).GlassFormField/GlassPasswordField/GlassTextArea/GlassPickerβ full iOS 26 input suite.GlassSideBarβ vertical navigation surface with header, footer, and scrollable items.GlassToolbarβ standard iOS-style action toolbar.GlassTabBarβ horizontal tab navigation bar with animated indicator and scrollable mode for 5+ tabs.GlassProgressIndicatorβ circular and linear variants (indeterminate and determinate), iOS 26 specs.GlassToast/GlassSnackBarβ 5 notification types, 3 positions, auto-dismiss, swipe-to-dismiss.GlassBadgeβ count and dot status badges, 4 positions.GlassActionSheetβ iOS-style bottom-anchored action list.
Performance #
- Universal Platform Support β
AdaptiveGlassandAdaptiveLiquidGlassLayerintroduced. All 26 widgets deliver consistent glass quality on Web, Skia, and Impeller. - Batch-blur optimisation β glass containers share a single
BackdropFilter(was: one per widget). ~5Γ faster in common multi-widget layouts. - Impeller pipeline warm-up β shaders pre-compile at startup to eliminate first-frame jank.
Theme System #
GlassTheme/GlassThemeData/GlassThemeVariantβ global styling and quality inheritance across all widgets. Set once, inherited everywhere.
0.3.0 β 0.1.0 #
Early access and preview releases establishing the core widget library, initial glass rendering pipeline (LiquidGlass, LiquidGlassLayer, LiquidGlassBlendGroup), and foundational components (GlassBottomBar, GlassButton, GlassSwitch, GlassCard, GlassSearchBar, GlassSlider, GlassChip, GlassSegmentedControl, GlassSheet, GlassDialog, GlassIconButton).