adaptive_liquid_glass 0.1.7
adaptive_liquid_glass: ^0.1.7 copied to clipboard
Flutter Liquid Glass widgets: iOS 26 Liquid Glass buttons, tab bar, sheets, sliders and toggles matched to SwiftUI, with Material 3 fallbacks on Android. One adaptive API.
0.1.7 - 2026-10-09 #
- pub.dev metadata: a searchable description, topics
glassmorphism,iosandwidget, and arepositorylink. - README: links the Medium write-up on how the glass was measured.
0.1.6 - 2026-10-09 #
- pub.dev's Example tab shows the quick start (
example/example.md); 0.1.5 still showed the test harness'sexample/lib/main.dart.
0.1.5 - 2026-10-09 #
- Example:
example/lib/quick_start.dart, a small app with the main widgets, replaces the Flutter template on pub.dev's Example tab (example/README.md); the README's quick start links to it. - README: Known limitations list the tab bar gaps, the components with unmeasured geometry and the picker menu's first-tap issue.
0.1.4 - 2026-10-09 #
GlassTabBarmotion, measured frame by frame against SwiftUI'sTabView(iOS 26.4):- The lens is the same size as iOS's on press, tap and drag (within ~1 pt), and the idle pill matches.
- A tapped lens travels at iOS's speed (a selection change no longer restarts it as a faster slide), lifts 7.0 pt as iOS's does, and the new pill fades in late, as on iOS.
- The bar's light and glow on press and drag, and the first frames' brightness, follow iOS's.
- The lens no longer bends page text or the bottom accessory.
- Labels beside the search tab sit where iOS sets them.
GlassSearchablein the navigation bar clears the status bar.- A centred
GlassMenuAnchormenu (picker) stays on screen near the edges. - README: a tab bar demo GIF.
0.1.3 - 2026-10-08 #
- README: fidelity numbers from the latest device run (59/75 strict passes, median ΔE 1.19) and the install snippet points at the current version.
0.1.2 - 2026-10-08 #
- Internal: nine
lib/srcfiles renamed to match the class they hold; the shader test seam moved ontoGlassProgram. No public API change (code importingsrc/paths directly must update them).
0.1.1 - 2026-10-08 #
- README: demo GIF and dark-mode component screenshots, served from GitHub so they render on pub.dev.
0.1.0 - 2026-10-08 #
First stable release. The 0.1.0-dev.x series is folded in below.
GlassEmptyStatesits where SwiftUI'sContentUnavailableViewdoes (measured; it was 2.5-10 pt low): a fitted bottom inset, and a taller icon gap for.search.GlassButton's glass label is opaque black over light content, as SwiftUI's.glassbutton draws it (measured; it read 38,38,38).showGlassFullScreenCover:- The slide's timing and curves are fitted from a screen recording of
SwiftUI's
.fullScreenCover(440 ms in, 406 ms out, within 0.6% of the screen's height RMS; were estimated). dragToDismiss: drag the cover down to close it, like a sheet (a quarter of its height or a 700 pt/s fling; springs back otherwise; a semantics dismiss action;PopScoperespected). Off by default, as SwiftUI's cover has none.showsCloseButton(+closeButtonSemanticLabel): a glass xmark circle top-trailing; a Material close icon on Android.
- The slide's timing and curves are fitted from a screen recording of
SwiftUI's
GlassPicker.style(GlassPickerStyle):inlinerows with a checkmark for aGlassListSection, andnavigationLink, a row with the current choice and a chevron that pushes a page of the choices (like SwiftUI's.pickerStyle(.inline)/.navigationLink). Material 3 counterparts.GlassLabel: SwiftUI'sLabel(_:systemImage:), an icon and title with vibrant label colours on glass (GlassLabelLayoutpicks the parts shown; geometry estimated).GlassLabelStyleis now public.GlassLinkandGlassShareLink: glass triggers for SwiftUI'sLinkandShareLink. Callbacks only (onOpen(Uri),onShare); the app wires its URL launcher or share plugin.GlassColorPicker: iOS 26'sColorPickerrow (label and swatch) opening a glass sheet with a preset grid, a spectrum square and hue bar, an opacity slider and a hex field; a Material 3 list tile and bottom sheet on Android. Geometry estimated, not yet measured.GlassSearchable: iOS 26's.searchablepresentation aroundGlassSearchField— Cancel button with a spring, suggestion rows on a glass platter, scopes as aGlassSegmentedControl,navigationBarorbottomplacement, driven byGlassSearchController. Material:SearchAnchor. Geometry estimated, not measured.GlassRefreshandSliverGlassRefresh: iOS 26's pull to refresh (SwiftUI.refreshable) with a glass spinner, haptic on trigger and a spring snap-back;RefreshIndicatoron Android. Geometry estimated, not yet measured.GlassDatePicker.style(GlassDatePickerStyle):graphicalrenders the calendar inline (GlassCalendaris now public, withshowWeekNumbers),wheelrenders day/month/year columns on one glass surface (GlassDateWheel).GlassDatePicker.pickerMode(GlassDatePickerMode):timeis an hour:minute capsule opening a wheel time picker (12/24-hour perMediaQuery.alwaysUse24HourFormatoruse24HourFormat,minuteIntervalrespected);dateAndTimeshows both capsules. Material:CalendarDatePicker,showTimePicker. Wheel geometry estimated, not yet measured.
0.1.0-dev.10 #
Glasspresets:Glass.frosted,Glass.crystal,Glass.smoke,Glass.accentandGlass.tinted(color), all composed from the existing material API.GlassActivityIndicator: iOS's spinner as a standalone widget (CircularProgressIndicatoron the Material path).GlassWheelPicker: SwiftUI's.pickerStyle(.wheel)in a glass surface with a clear-glass selection band and haptics (ListWheelScrollViewon the Material path).
0.1.0-dev.9 #
- Add light and dark screenshots with plain backgrounds to the pub.dev gallery.
- Keep photo-background screenshots as additional glass-effect examples.
0.1.0-dev.8 #
- Add light and dark iOS example screenshots to the pub.dev package gallery.
- Remove the private repository link from package metadata.
0.1.0-dev.7 #
- New components (Material 3 counterparts on Android):
GlassTextField, withGlassTextField.password.showGlassToast, withGlassToastActionandGlassToastHandle.GlassListSectionandGlassListTile: iOS 26's inset-grouped list, measured against SwiftUI on iOS 26.4.showGlassActionSheet: iOS 26's confirmation dialog, measured.GlassChip,GlassBadge,GlassPageControlandGlassProgressIndicator(geometry estimated, not yet measured).
AdaptiveLiquidGlass.initialize()preloads the shaders before the first frame.GlassMenuControllerdrives slide-to-select from an outer gesture (glideTo,endGlide,cancelGlide).GlassScrollEdgeStyle.progressiveon the navigation bars: an opt-in graduated blur under the bar. The default is unchanged.- Rounded rectangles use a continuous (iOS-style) corner
(
GlassConstants.cornerZone). - Interactive glass stretches toward a finger dragged past its edge, and shows a focus ring under keyboard focus.
GlassTabBarre-measured against SwiftUI'sTabView: selected and unselected colours, pill, icon and label sizes, and the bar's glass.- Accessibility: one screen-reader node per control; explicit labels
replace the visible text;
semanticLabelonGlassPicker,GlassMenuItem,showGlassPopoverandGlassSearchField; tapping outside a menu or picker is announced as "Dismiss". - Fixes:
- Glass and the text on it now follow one brightness (the theme's),
including inside dialogs, sheets, popovers, menus and toasts. Behaviour
change: a
MaterialAppwith no dark theme now gets light glass on a dark system. GlassTabBar: the pill no longer stops on a different tab from the selected tint whenselectedIndexdoes not change, and the held lens no longer draws black on the native path.GlassTogglereturns tovaluewhen the parent rejects a change.- The tab bar's search button had no screen-reader tap action; disabled stepper halves still offered one.
- Glass and the text on it now follow one brightness (the theme's),
including inside dialogs, sheets, popovers, menus and toasts. Behaviour
change: a
- Includes code adapted from liquid_glass_widgets (MIT); see
THIRD_PARTY_NOTICES.
0.1.0-dev.6 #
- Fix: on iOS 26 (native glass), content no longer flickers as it scrolls under the navigation bar. The scroll edge keeps its fade but drops its blur there, since Flutter cannot blur UIKit views in place.
- Fix: labels on glass no longer flip between light and dark while content scrolls past. A flip now needs the backdrop to move clearly past middle grey, on two samples in a row.
0.1.0-dev.5 #
-
New components, each measured against SwiftUI on iOS 26.4:
showGlassAlertandshowGlassConfirmationDialog, withGlassDialogAction.showGlassPopoverandGlassPopoverAnchor.GlassPicker(menu style).GlassStepper.GlassDatePicker, the compact style with a glass calendar.GlassContextMenu.GlassTabBar.onSearch, iOS 26's search tab.
-
showGlassSheettakesdetents(GlassSheetDetent.medium,.large,.fraction,.height):- It drags between detents and dismisses on a drag or fling down.
- At
largeit is edge to edge and opaque, with the screen's corners. - It is its own route now, so it needs no Material ancestor.
- Breaking:
isScrollControlledis removed; usedetents.
-
The earlier components were re-measured against SwiftUI:
- The segmented control is 32 pt and the slider thumb 37 pt.
- The toolbar is 48 pt, 28 pt from the screen's edges.
- The menu opens over its button, with icons at the start.
- Swipe actions use SwiftUI's compact and stacked layouts.
- Toggle, slider, segmented control and stepper colours are measured, in light and dark.
-
GlassSystemColors: iOS 26's red, blue, orange and green. -
Fixes:
- Glass labels on a light page inside
GlassScaffoldwere white. - A grey band appeared on the tab bar next to an accessory.
- The menu button's glass drew over its open menu.
- Material's letter spacing leaked into glass text; iOS tracking is now applied.
- Text in glass routes fell back to Flutter's debug style (underlines).
- Components threw without Cupertino localizations.
- With an accessory, the tab bar widens to the accessory's width, as on iOS.
- Glass labels on a light page inside
-
Tooling:
tool/reference/capture_components.sh,measure_components.pyandcompare_components.pyscore every component against SwiftUI per path. -
GlassScaffold: an iOS 26 screen in one widget. The navigation bar sits on top, the tab bar or toolbar floats at the bottom with an optionalGlassBottomAccessory, and the body runs under the bars, padded clear of them. -
GlassToolbarandGlassToolbarSpacer: the floating bottom toolbar. -
GlassToggle,GlassSliderandGlassSegmentedControl: their thumbs turn into clear glass lenses while pressed. -
showGlassSheetandGlassSheet: a floating glass sheet. -
GlassMenuButtonandGlassMenuItem: a glass pull-down menu. -
GlassSearchField: a glass search capsule. -
GlassSwipeActionsandGlassSwipeAction: list swipe actions with tinted glass capsules, a full swipe and a haptic. -
GlassTabBar: a selection haptic as the dragged lens reaches each tab (enableFeedback). -
Internal: one class per file, and fixed colours moved to
GlassColors. The public API is unchanged.
0.1.0-dev.4 #
GlassTabBar, matched frame by frame to iOS 26.4's tab bar (Kept):- The lens is shader glass. It bends the page and bar behind it outward
into its rim (a dark, colour-split band along its long sides), and
draws the tinted tabs over that in their own pass
(
tab_lens_content.frag): pulled inward towards the lens's round ends, softly blurred, keeping their colour. Teal-cyan rim, no white wash; tabs under it are magnified about their own centres. - The bar is shader glass fitted to UIKit's bar (flat fill, even 1 pt rim, lighter frost). It lights up around a held lens and evenly while the lens is dragged, fading after release.
- The lens follows the finger with a continuous spring (no stutter) and trails it as iOS's does; tapping a far tab sends it across and settles it on arrival. The selected tint no longer flickers.
- An explicit
mode:still wins.
- The lens is shader glass. It bends the page and bar behind it outward
into its rim (a dark, colour-split band along its long sides), and
draws the tinted tabs over that in their own pass
(
GlassVariantConstants:lensVertical(bend mostly where the outline faces up or down),rimTintandrimHue(a tinted rim). All default to off.GlassButton/GlassButton.icon: SwiftUI's glass and prominent button styles, destructive and cancel roles, control sizes, border shapes, disabled and loading states; Material 3 buttons on Android. Sizes measured from SwiftUI (tool/reference/controls.json).GlassBackButton,GlassNavigationBar(inline title) andSliverGlassNavigationBar(collapsing large title): iOS 26's navigation bar, measured from SwiftUI;AppBar/SliverAppBar.largeon Android.
0.1.0-dev.3 #
glassEffect(onPressed: ...): a glass button in one line, same asLiquidGlass.onPressed.GlassTabBarandGlassTabBarItem: iOS 26's floating tab bar. The selected tab sits on a pill; pressing turns it into a clear glass lens that overhangs the bar and magnifies the tabs under it, dragging slides it between tabs, and letting go springs it to the nearest tab (sizes and timing measured from iOS 26.4). Works in every render mode, follows the reading direction and Reduce Motion, and exposes each tab as a selectable button to assistive tech.- Tabs shrink evenly to fit the width the bar is given (
itemWidthis now the maximum), so five tabs fit a phone. - Tab bar motion measured frame by frame against iOS 26.4's own tab bar: pill 7.55 wider than the 86.15 tab spacing; the lens (114 × 74) grows on a 0.38 s spring, trails the finger on a 0.3 s spring at 1.06× its offset from the bar's centre, wobbles in height with its acceleration, and settles back with a squash on a 0.36 s spring; the bar grows towards the lens; tabs under it magnify 1.21 × 1.10. The tabs now lie beneath the lens glass, so it refracts them at its rim.
GlassTabBarItem.activeIcon(the selected tab's icon) and.badge(a count or short text in a red capsule, a dot when empty; read with the tab by assistive tech).- On the Material path (Android by default) the bar is a Material 3
NavigationBarin the same floating capsule, with ripple and badges.
0.1.0-dev.2 #
Task 17d — noise floor, tone LUT, hard target met #
- Certified fidelity: 46/75 scenes pass (SSIM ≥ 0.97, ΔE ≤ 2.0), median SSIM 0.9828 / ΔE 1.09, min SSIM 0.9532, 0 scenes below 0.95 (75 in-set; held-out 48-scene set 18/48, min 0.9470).
- Tone LUT: piecewise-linear 9-knot input→output curve per variant set,
measured from grey flats (covers below the 0.15 code floor); small dark
shapes gain a
toneLift. - Clear glass: lens max-min grid (
lensSizeRef/lensStrength), rim mix, post-blur share; regular dark: anisotropic frost (blurAspectPower). - Noise floors: SwiftUI-vs-SwiftUI repeat floor is exactly zero
(bit-deterministic simulator); SwiftUI-vs-UIKit cross-API floor
committed;
compare.py --flooradds report-only within-noise verdicts.
-
Native glass is SwiftUI's own: native mode hosts a
GlassEffectContainerwith a.glassEffectview per member (was UIKitUIGlassEffect), so it matches SwiftUI pixel for pixel, followsMediaQuery.platformBrightnesslike the shader path (and re-themes when it changes at runtime), draws circles as circles and supportsunionId. -
Breaking: native glass is the default on iOS 26+;
autopicks it from the first frame (the iOS version is read synchronously at startup).LiquidGlassThemeData.nativeEnabledis removed; usemode:ordefaultMode: GlassRenderMode.shaderto opt out. -
Widget.glassEffect(glass:, shape:, glassId:, unionId:, padding:): one-line glass, mirroring SwiftUI's.glassEffect(_:in:). -
LiquidGlass.padding: insets the child inside the glass (directional). -
LiquidGlass.adaptiveForeground(defaulttrue): text and icons on glass take a readable label colour (the Material on-colour on Android); explicit colours still win. -
LiquidGlass.onPressed: glass as a button, with button semantics, focus, Enter/Space activation and interactive glass unless the glass opts out withinteractive(false). -
Glassremembers an explicitinteractive(false), so it no longer equals the plain preset. -
LiquidGlass.precache()is optional: shader glass draws as a blur until the shader loads, then switches in place. -
Android and the other non-shader paths no longer load the shader.
-
concentricRadiusis no longer exported. -
Android is declared as a supported platform (a Dart-only plugin entry).
-
Breaking:
GlassMotionConstants.pressScaleis replaced bypressGrowthAreaandpressScaleMax: a pressed shape grows by about the same area whatever its size (sqrt(1 + pressGrowthArea / (w·h)), capped), as SwiftUI does, so small shapes grow more than large ones. -
Press-in and release use separate springs (
releaseResponse,releaseDamping); press, release and morph springs, press stretch and glow radius are refitted to lossless SwiftUI recordings. -
Shader fidelity: every reference scene is at SSIM ≥ 0.95 against SwiftUI (minimum 0.9532, median 0.983, median ΔE 1.09), with a per-variant tone curve, anisotropic frost, a wide frost tail and a refitted clear lens.
-
Example: an Android host, a dark theme for the gallery, and motion-scene harness entries (
-motion,-dump); harness entries default to the shader unless-mode nativeis passed.
0.1.0-dev.1 #
- First development release:
LiquidGlass,GlassGroup,Glass,GlassShape,LiquidGlassTheme,GlassBackdropSourceandGlassForeground; shader glass fitted to SwiftUI on iOS, Apple's native glass on iOS 26+ (opt-in), Material 3 on Android.