liquidum 1.0.2
liquidum: ^1.0.2 copied to clipboard
Apple's iOS 26 Liquid Glass for Flutter, measured against UIKit: glass, buttons, controls, tab and navigation bars, menus, sheets, alerts and popovers.
1.0.2 #
One more fix found by comparing Liquidum and liquid_glass_widgets against UIKit (doc/comparison/liquid-glass-widgets): holding a slider's thumb was the one scene where liquid_glass_widgets was closer to UIKit. Liquidum is now closer in every scene.
- Fix: the held thumbs of
GlassSwitchandGlassSlidernow look like UIKit's, measured on iOS 26.5 (the held slider went from 11.9 to 3.6 levels from UIKit, the held switch from 17.5 to 10.8). The slider's lens no longer pinches the track under it. Both lenses lift black and saturate colors as UIKit's do, blur only near their edge, shade their upper-left edge and light their lower-right one, and cast a gray shadow tinted by the control's color instead of a black one.
1.0.1 #
Two fixes found by comparing Liquidum and liquid_glass_widgets against UIKit (doc/comparison/liquid-glass-widgets).
- Fix: a
GlassButtonwith a label was 4pt too tall in English. Its heights had been measured with the simulator in Arabic, whose system font has a taller line. Like UIKit's, a button with a label is now 28, 34.33 or 50.33pt tall in English and taller by the device's language, as measured on iOS 26.5 in 39 languages: 4pt in Arabic, Persian and Vietnamese, 6pt in Thai and Hindi, 9pt in Urdu, for example. - Fix: a
GlassButtonorGlassBarItemmenu that fits neither from the button's left edge nor from its right edge is now centered on the button, as UIKit's. Before, it was pushed against the screen's left margin.
1.0.0 #
Liquidum 1.0 brings all of UIKit's iOS 26 Liquid Glass to Flutter, each
widget rebuilt from UIKit and measured against it on iOS 26.5: the glass
and its groups, buttons, the switch, slider and segmented control, the tab
bar, navigation bars and toolbars, pull-down and context menus, the edit
menu, the date picker, sheets, alerts, action sheets and popovers. The API
in package:liquidum/liquidum.dart is now stable and follows semantic
versioning; package:liquidum/liquidum_debug.dart stays outside it.
Glassis now UIKit's glass (UIGlassEffect), measured at 30 to 400pt: the tab bar's material at any size, with the inputs UIKit gives each size (refraction, frost, shadow, and for large glass its fixed appearance and bleed), Apple's continuous corners, UIKit's refraction around them (it turns well before a side meets its corner, and in large regular glass leans toward the center), aclearstyle,tintandbrightness. Small glass turns light or dark with what is behind it.- Breaking:
GlassMaterialandGlass.materialare gone; useGlass(style: GlassStyle.regular or GlassStyle.clear). - New:
GlassGroup, UIKit's glass container (UIGlassContainerEffect). TheGlassin it is drawn as one glass whose shapes melt together within itsspacing, with UIKit's union (measured on iOS 26.5): a neck where they come within half the spacing, the inputs of its smallest and largest glass, one appearance for the group, tints that stay with their glass. - New:
Glass.visiblematerializes and dematerializes the glass as UIKit's does when its effect is set in an animation: blur, refraction, color, rim and shadow grow or fade together over half a second. - New:
GlassButton, UIKit's glass buttons (UIButton.Configuration'sglass(),prominentGlass(),clearGlass()andprominentClearGlass()): a label, an icon or both, four sizes, UIKit's metrics, and its vibrant label, which takes the colors of the glass under it. - New:
Glass.interactive, UIKit's interactive glass (UIGlassEffect.isInteractive): pressed, the glass swells by UIKit's points for its size, lightens and glows under the finger, stretches toward a drag and springs back, on UIKit's springs. - New:
GlassSwitch,GlassSliderandGlassSegmentedControl, UIKit's iOS 26 controls whose thumb or selection is the tab bar's liquid lens: a 63 x 28 switch, a 34pt slider, a 32pt segmented control, with UIKit's measured geometry, colors, springs and lens for each (the switch's and slider's thumbs lift into UIKit's small lens, the selection into the bar's), compared with UIKit at rest and in motion. - New:
GlassPageandGlassBarItem, UIKit's iOS 26 bars over a page: a navigation bar of glass (a title, a back button, leading and trailing items, a large title that collapses into the bar) and a toolbar or a search field at the bottom, with UIKit's metrics, grouping, presses and its scroll-edge effect where content scrolls under them, light and dark. - New:
GlassButton.menuandGlassMenuItem, UIKit's pull-down menus (showsMenuAsPrimaryAction): a touch opens a 250pt platter of large glass that grows out of the button with UIKit's liquid morph (the button and the menu melt as two shapes on UIKit's springs, fitted to its frames on iOS 26.5) and morphs back into it. UIKit's rows, checkmarks, icons, dividers, destructive items and placement (down, or up with the rows reversed near the bottom; from the right edge near the screen's right), a finger that slides from the button onto a row and lifts, and submenus (GlassMenuItem.submenu) that open over the menu.onPressedis now optional on a button with a menu. - New:
GlassBarItem.menu: a bar item opens its menu out of its glass, as UIKit's (onPressedis now optional on an item with a menu). Holding aGlassPage's back button for 0.6s opens UIKit's history menu: the titles of the pages under it in its navigator, nearest first; lifting the finger on one goes back to it. - New:
GlassContextMenu(items:, child:), UIKit's context menus (UIContextMenuInteraction), measured on iOS 26.5: a resting finger grows the view; after 0.8s it lifts over the dimmed screen with its shadow and the menu grows out of its center with the liquid morph, 20pt beside it on the side with more room. Slide onto a row and lift to choose it; a tap outside closes the menu. A shorter touch stays the view's own. - New:
GlassPage's bars between two pages, as UIKit's push and pop: the bars stay while the pages slide under them; a platter whose items change morphs into the other page's, swelling and settling as its items crossfade; one on a single page melts into its neighbor or grows out of it; the back button and a toolbar on one page only materialize or go; titles ride with their pages. A swipe back drives it. Nothing to set. - New:
GlassEditMenu, UIKit's edit menu (UIEditMenuInteraction) on iOS 26.5: the row of actions on a capsule of glass, 15pt below the selection (above it without room), growing out of it and shrinking back on UIKit's springs; actions that do not fit give way to a chevron that melts the capsule into the full menu, Cut, Copy and Paste as tiles across its top. For a text field,contextMenuBuilder: GlassEditMenu.builder; your own actions withGlassEditMenu(anchors:, items:). - New:
GlassDatePicker, UIKit's compact date picker (UIDatePicker,.compact) on iOS 26.5: the date, the time or both on gray capsules; a tap opens UIKit's calendar (the month with its arrows, today in blue, the chosen day on a circle, the month and year on wheels from the title) or its time wheels on a platter of glass, which grows out of the label and unfolds on UIKit's spring, below it or above it near the bottom. A tap elsewhere closes it. - New:
showGlassSheet(context:, builder:, detents:), UIKit's sheet (UISheetPresentationController) on iOS 26.5: it rises over the dimmed screen to its smallest detent (GlassSheetDetent.medium,.largeor.height(...)) on UIKit's spring. Below the large detent it is a panel of large glass held 8pt off the screen's sides and bottom, its corners concentric with the screen's; dragged up it grows to the screen's width and, past halfway, turns opaque. Drag it between its detents, down or a tap outside to dismiss it; a finger on it swells it as UIKit's interactive glass. - New:
showGlassAlert(context:, title:, message:, actions:, textFields:)andshowGlassActionSheet(...), UIKit's alert (UIAlertController) on iOS 26.5: a panel of large glass in the middle of the screen with its actions (GlassAlertAction(label:, onPressed:, destructive:, cancel:)) as capsules, side by side for two and stacked otherwise, and optional text fields (GlassAlertTextField). It grows in from 1.2 times its size over the dimmed screen on UIKit's spring and fades away once an action is chosen; a finger can slide between the actions before letting go. An action sheet that no view presents from is shown the same way (as iOS 26.5 does), and a tap outside it cancels it. - New:
showGlassPopover(context:, builder:, size:), UIKit's popover (UIPopoverPresentationController) on iOS 26.5: large glass with UIKit's rounded arrow pointing at the widgetcontextbelongs to, placed on the side UIKit picks (above, below, right, left; centered if it can be, 10pt inside the screen), sized to its content orsize. It grows out of its arrow as it fades in and goes back into it on UIKit's springs; there is no dim, and a tap outside dismisses it.showGlassActionSheet(source:)shows the action sheet as UIKit does when it has a source view: a 240pt popover by it, its actions stacked, without its cancel action (a tap outside chooses it). - Fix: large glass's bleed (alerts, menus, panels over 64pt) is refitted to UIKit's over grays as well as colors: it no longer tints glass over white (by up to 5 levels), and dark glass over dark or bright backdrops is within 1 to 2 levels of UIKit's (was 3 to 17).
- Fix: menu rows with icons but no checkmark start their icon and label where UIKit's do (40 and 64pt; 55 and 79 only beside a checkmark).
- Fix: a tinted
Glasskept its tint while dematerializing (visible: false); the tint now comes and goes with the glass. - Fix: hiding glass inside a hidden menu source (a back button with a history) now hides it too.
- Fix: a
GlassButtonwith a menu inside aGlassGroupkept its glass while its menu was open; and it no longer adds a layer around its glass. - Fix: glass in a
GlassGroupdrew its content (aGlassButton's label) in the system's look instead of the group's when the group turned light or dark with what is behind it. - Fix: on Android (Impeller's OpenGL ES backend) every glass drew what is behind it, and the tab bar its icons and labels, upside down: Flutter 3.47 no longer stores those textures flipped. Liquidum now needs Flutter 3.47 or later.
- Faster: every glass read what is behind it with its own snapshot of the page; now one snapshot per drawn frame serves them all (a page of a dozen glass buttons and controls took about four times as many while it animated).
- Faster: the glass beside a
GlassBackdrop(over it, in the sameStack, not inside it) reads the screen twice in all instead of twice each: the backdrop draws the frost of all of it right after its content, and then each glass is drawn from one read of that. A glass button's label, and a bar item's, is drawn in its glass's pass instead of reading the screen again. Flinging a page of a dozen glass buttons and controls on Android now misses 2% of frames instead of a third (two thirds before any of this); on iOS the buttons and bars draw as before, to the level. - Fix: glass over a backdrop with no background of its own (see-through content) took it for black and turned dark.
- Docs: every public member has a doc comment. A new example app,
example/lib/showcase.dart, uses every widget in a travel and home app, light and dark, over photos; the README is rewritten around it.
0.2.2 #
- License: Liquidum is now under the MIT License, free for any use, commercial included.
- Breaking: the
debug*parameters ofGlassTabBarare replaced by aGlassTabBarDebugwidget above the bar, whoseGlassTabBarDebugOptionshold the same settings.GlassTabBarPhysics,GlassAppearance,GlassTabBarDebugViewandGlassTabBarOpticsmoved topackage:liquidum/liquidum_debug.dart, which is not covered by semantic versioning.GlassSpring,GlassShape,GlassField,GlassBackdropState,GlassBackdrop.underand the render objects (RenderGlass,RenderGlassTabBar) are no longer public. - Backdrop sampling follows drawn frames: no timers or snapshots while idle or in the background. Over a still backdrop the bar now stops reading it; before, each reading drew frames that called for the next one, up to 20 readings a second for as long as the bar was shown.
