g1455 0.1.0
g1455: ^0.1.0 copied to clipboard
Liquid Glass for Flutter: refraction, blur and rim over the live backdrop, with the capture priced, held and shared rather than taken per surface.
Unreleased #
What a screen reader is told and can do:
GlassSwitchandGlassSlidertake asemanticLabel. A screen reader stepsGlassSliderwith increase and decrease, bysemanticStep(a tenth by default), throughonChangeStart,onChangedandonChangeEnd, and never past either end.GlassButtontakes asemanticLabelthat is read in place of its child, for a button that is only an icon.showGlassSheettakes abarrierLabel, asshowGlassDialogalready did.GlassMenuAnchorandGlassPopoverAnchortake one too. Their barrier used to be a tap target with no label, so a screen reader had no way to close a popover.
On a page:
showGlassSheettakesconstraints, asshowModalBottomSheetdoes. AmaxWidthkeeps the sheet at its content's width, centred, on a window wider than that. Null, it spans the window as before.- The labels of
GlassButton,GlassSegmentedControlandGlassTabBarare not text to select. Under aSelectionArea, a drag across the page used to take them along with the prose around them.
Fixed:
- Glass standing on glass no longer moves what is under the glass it stands
on. When a level was captured, the walk painted the levels below it, and a
CompositedTransformTargetamong them wrote the walk's offset into its own liveLeaderLayer. ASelectionAreacreates one. So with a popover open over a bar, the bar's text jumped right and down, and it stayed there until the bar repainted. The walk now puts back every live offset it touches. - A
GlassGroupdrawn in tiles no longer loses members on the web. Skwasm's fragment shader keeps its uniforms by reference rather than copying them on each draw, so every tile drew the last tile's members, and blobs flickered in and out. On the web each tile now gets its own shader. - A platform view or a
Textureis a hole in the capture of an upper level, as it already was in the base level. It used to be a grey stub. On the web everySelectionArealays a transparent platform view under what it holds, so a bar over a selectable page showed grey.
0.1.0 #
First release on pub.dev, as g1455. The package was glass while it lived
beside the research application that measures it: the library is now
package:g1455/g1455.dart, the shader asset keys are
packages/g1455/shaders/..., and glass_diagnostics.dart keeps its name.
Everything since the first cut:
Breaking: GlassFinish.regular is now GlassFinish.regularDark, and its
damage-table key is 'regularDark' (D230). It was always the dark branch of
Apple's .regular, because S4's iPad was in dark mode. The light branch is the
new GlassFinish.regularLight: transmission 0.282, tint 252 at 0.718, and its
own rows in the resolution and staleness tables.
GlassFinish.regular(appearance:, backdrop:) picks the branch Apple's
material would. It switches at a backdrop level of 54 in light mode and 222 in
dark mode. GlassHost.finish is now optional. Null means that choice,
following the declared backdrop and the platform's appearance. GlassTheme.of
with no host above does the same. At the default budget the light branch may
hold its capture one frame (0.284 ΔE against 0.348).
Drops and lone panels no longer appear through presence, which eroded a
capsule to a bright line about 2 pt tall for ~50 ms on the way out. The
tab bar's, switch's, slider's and segmented control's drops, and the alert and
the menu, now come and go through materialize, as Apple's do (D216, D230).
showGlassDialog and showGlassSheet carry the caller's InheritedThemes
to the navigator's overlay, as showDialog does. Their content used to
inherit what stands above the navigator, which in a MaterialApp is its
error style: red, monospace, underlined in yellow.
GlassMenuAnchor's menu grows out of its anchor — from the anchor's size and
capsule to its own, about the corner the two share — while it materializes,
and shrinks back into it on the way out. New GlassPopoverAnchor: the same
panel around any content, open until a tap outside it. Opening a menu over an
anchor with a semantics node of its own no longer trips the framework's
!semantics.parentDataDirty on close.
New components, read off Apple's own on iOS 26.5 simulators (D222–D226):
-
GlassScrollEdge: the scroll edge effect under a bar, soft or hard, top or bottom. It carries the bar and lifts it. The soft top is a blur of σ 1.6 through the newGlassFadeplus an erf tint. The soft bottom is a tint and nothing else, so it captures nothing. -
GlassAbove: raises glass over the glass beside it. A bar over glass cards now shows the cards. It costs one snapshot per recorded frame, and only when there is glass under it. -
GlassSegmentedControl: the selection lifts into a clear drop over a track that is not glass. One level; a slide records nothing. -
GlassButtonGroup: adjacent toolbar actions in one capsule, so one surface rather than one per button. -
GlassTextFieldandGlassTextField.search: a glass capsule holding anEditableText. The caret and typing take no capture. -
showGlassDialogwithGlassAlert,showGlassSheetandGlassMenuAnchor. The menu is placed as Apple places a button's menu (D228): over the anchor, corner on corner, with the anchor hidden. It is 250 wide with rows of 42 and a 31.5 corner. When it opens upward, its items are reversed. These need theGlassHostabove the navigator (MaterialApp.builder), and they say so in debug when it is not. -
GlassSurface.fade(GlassFade): the glass fades across itself. It is a smoothstep, and an exact1.0when unused. -
GlassRipple(D229), optional and not Apple's: a viscous wave from where the glass was touched. A dimple sinks under the finger, a front travels out, and the dimple springs back on release.viscositygoes from water to honey. Set it onGlassHost.ripple,GlassThemeData.rippleorGlassSurface.ripple. It is drawn by a second program, so a surface with no wave runs the same bytes as before, and a wave takes no capture. Off under reduced motion. Not drawn by fused group members.
Fixed:
- The slider's fill ended in a square cut that the clear drop magnified. It is now a capsule, as Apple's is (D222).
- A screen whose only glass was a resting drop (switches, segments) never
stopped drawing.
publishUppernotified listeners on every frame even when nothing had changed (D224). - Under glass on glass, a still screen recorded on every frame when the lower
glass held content that was not behind a
RepaintBoundary, such as a plainText. The publish repainted the content, and the new pictures read as a change. A surface now re-adds its content layer when only the proxy changed (D224). - With two finishes on one screen, each blur class blurred the whole atlas. It now blurs only the box around its own slots. On the iPad this was 0.8 ms of a scrolling frame with a scroll edge over cards (D227).
0.1.0-dev.1 #
Not published.
First cut of the package, moved out of the research application that measured
it. Behaviour is unchanged from that application's lib/, with one exception:
a debug assertion. The changes:
- Shaders moved under
lib/shaders/and are declared throughpackages/glass/. The asset key is nowpackages/glass/shaders/...whether the package is the root or a dependency. glass_diagnostics.dartis a new library for benchmark switches and the host's proxy handle:debugGlassFusedSplit,debugGlassFoldCull,debugGlassShaderAntiAlias,fusedDrawTiles,GlassFusedTile,kMaxFusedTiles, the two shader asset keys,GlassProxyHandleandGlassProxyScope. These are no longer exported fromglass.dart.GlassPlatformSignalsandGlassSignalswere removed from the package. It ships no platform code, and the native side never belonged to it. The application reads these settings and passes them in.GlassThermalStatestays, becauseGlassHost.thermaltakes it.- The host's debug check that the layer watch saw a repaint no longer fires when
everything that repainted is glass content. Example: a label inside a
GlassBarchanging, when the bar's height follows the label. That case is not a hole, because glass content is not part of the proxy. The check now reads a second walk that excludes only the glass draws (D219). - The same check no longer fires when the host's boundary was repainted but
drew nothing of its own.
RenderObject.layoutmarks paint unconditionally, so an application'ssetStatethat re-runs aScaffold's layout at the same geometry repaints the host's boundary. When every pixel under it belongs to a nested boundary, that repaint mints no picture and the screen is still. The example's slider tripped it on its first press. The check now fires only when a picture outside every nested boundary is present. GlassSurface.labelled,GlassGroup.labelledandGlassUnion.labelled: glass that carries no label is exempt from the theme'sminLabelContrastdim and keeps the finish it names. The switch's, slider's and tab bar's drops are unlabelled. Dimmed for a label they do not have, they turned grey over a rich backdrop.GlassButtonno longer fills the width it is offered. In aWrapor aColumnit was a bar, because its label sat in a bareCenter.- Disabled controls now look disabled. Before,
onPressed: nullandonChanged: nullremoved the gestures and nothing else. As on iOS 26, a disabledGlassSwitchorGlassSlideris drawn as one group atkGlassDisabledOpacity(0.5), with a plain knob in place of the drop. A disabledGlassButtonkeeps its glass, and its label becomeskGlassDisabledDarkLabelorkGlassDisabledLightLabel(iOS'stertiaryLabel), chosen by the polarity of the label it would have drawn enabled (D221). A control disabled mid-press or mid-drag lets go.
