Builds Flutter UIs with the g1455 Liquid Glass package for iOS 26-style glassmorphism (refraction, blur, tint, rim). Guides setup of GlassHost, GlassSurface, and Glass* widgets.
Ships in g1455. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
One GlassHost captures what is painted under all of its glass into one shared
image, only when something under the glass changed; every glass surface samples
its slot of that capture. Most rules below follow from that.
Package 0.x: the API changes between minor versions. If the project's
pubspec.lock resolves g1455 to something other than 0.5.x, check the
changelog before relying on this
file. Requires Flutter >= 3.47. Pure Dart and shaders: no platform setup.
flutter pub add g1455 material_ui
The examples import Material from material_ui, where Flutter 3.50 moves it;
g1455 itself needs only widgets.
import 'package:material_ui/material_ui.dart';
import 'package:g1455/g1455.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await GlassHost.precache(); // compile shaders before the first frame
runApp(const App());
}
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) => MaterialApp(
// Above the navigator: dialogs, sheets, menus and popovers need it too.
builder: (BuildContext context, Widget? child) => GlassHost(
backdrop: const Color(0xFF101014), // average colour behind the glass
richBackdrop: true, // content is images / a feed
minLabelContrast: kTextContrastAA, // keep labels at WCAG AA
child: child!,
),
home: const HomePage(),
);
}
Glass goes over content, in a Stack:
Stack(
children: <Widget>[
Positioned.fill(child: content), // what the glass refracts
Positioned(
top: MediaQuery.paddingOf(context).top + 8,
left: 16,
right: 16,
child: const GlassBar(child: Text('Library')),
),
],
)
For a whole screen (top bar + list + optional tab bar and floating button) use
GlassScaffold instead of building the Stack by hand:
references/components/scaffold.md.
Break one of these and the result is wrong, slow or invisible.
GlassHost, in MaterialApp.builder / WidgetsApp.builder.
No host above: a surface draws only its child, no glass. Host below the
Navigator: modals throw a debug error. Never one host per widget. Never a
GlassTheme above the host (the host overrides it); nest it below.Stack. Over
one flat colour it is a grey box: use a plain Container/Card there.backdrop: Color. Images,
video, maps, feeds: richBackdrop: true plus minLabelContrast: kTextContrastAA. Glass over photos whose brightness varies across the
screen: adaptive: const GlassAdaptive().GlassBar, GlassCard,
GlassButton, alert, menu, popover and text field set DefaultTextStyle
and IconTheme to black or white. Do not hard-code text/icon colours inside
them. Material IconButton ignores the theme: use plain Icon in a
GestureDetector, or pass IconTheme.of(context).color.GlassButtonGroup, not N GlassButtons.
Inside a GlassBar, plain icons are cheaper than GlassButtons (glass on
glass).GlassAbove. A bar floating over a list
of GlassCards shows the page with the cards cut out unless wrapped in
GlassAbove. Nested glass (a button inside a bar), GlassScrollEdge,
GlassScaffold and all modals already handle this.GlassTravel, with a
RepaintBoundary around the content under it and around the moving glass.
Otherwise every frame of motion is a capture. The built-in switch, slider,
segmented control and tab bar already do this.Texture, video, camera, maps record nothing into the
capture: the glass shows a hole. Wrap them in
GlassProxy.replace(painter: ..., child: ...) with a stand-in
(SolidProxyPainter, GradientProxyPainter, or a custom
GlassProxyPainter).BorderRadius only, drawn as RSuperellipse, one radius per
surface. kGlassCapsule = pill/circle at any size. No paths, stars, or
different corners. No chromatic aberration/dispersion: not supported, do
not emulate it.GlassFinish.regularDark, .regularLight, .clear,
.frosted, or GlassFinish.regular(appearance:, backdrop:). Customise with
copyWith(...) and keep the preset's name: an unknown name loses the
measured tables and captures at full resolution (slower). Default (null) is
Apple's .regular, branch picked from backdrop and platform brightness.
An app whose theme does not follow the phone's declares
GlassHost(appearance: Brightness.dark) (or light), or a dark app on a
light-mode phone gets light glass; it keeps adaptive glass working, where a
named finish holds its branch. Text on .clear needs minLabelContrast.labelled: false, so it
is not dimmed for a label floor.SafeArea is applied by bars. Add MediaQuery.paddingOf(context)
to offsets yourself (or use GlassScaffold).GlassSwitch(value:, onChanged:),
GlassSlider(value: 0..1, onChanged:) (needs bounded width: Expanded in a
Row; divisions: for steps, never rounding in onChanged),
GlassStepper(value:, onChanged:, min:, max:, step:),
GlassSegmentedControl(segments:, selectedIndex:, onSelected:) and
GlassTabBar(items:, selectedIndex:, onSelected:) take 2 to 5 items.
onChanged/onSelected: null disables. The switch, slider and segmented
control work inside a PageView and a vertical list with no setup, take
the keyboard's focus, and mirror under RTL.GlassSurface.materialize (0..1; blur and
bend first, tint last; captures every frame while it runs). presence
erodes the shape and is for budding inside a GlassGroup; alone it
narrows to a line.tier: GlassTierPolicy(reduceTransparency: ..., ceiling: lowEnd ? GlassTier.cheap : null).choose(), highContrast:, thermal:.
Declare backdrop: whenever the opaque tier may be used (it fills with it).
Never ship GlassTierPolicy(pinned: ...): it overrides the user's setting.flutter build web --wasm; where the app runs on
CanvasKit (kIsWeb && !kIsWasm) use ceiling: GlassTier.cheap.content: GlassContentDeclaration.undeclared,
maxCaptures, resolution, blurPass, or
package:g1455/glass_diagnostics.dart.GlassGroup / GlassUnion are a look, not an optimisation. They cost
more than separate surfaces. Members' own finishes are ignored; at most
kMaxFusedShapes (12) fuse. Never wrap the page background in one.GlassRipple) is opt-in and not Apple's. Leave it off for an
iOS-faithful app. A rippling surface is hit-testable over its whole shape.Opacity, FadeTransition, ColorFilter or
ImageFiltered. The layer it opens drops the glass. Fade glass with
materialize; hide it with Visibility.GlassBackdrop.painter / .image / .color, and the glass samples a
texture made once while the host captures nothing for it. Never over
content that moves (a list, a video): the glass shows the declaration, not
the screen. GlassBackdrop.live hands a subtree back to the capture.GlassStepper, not two GlassButtons; a
count on an icon is a GlassBadge (opaque red, not glass, costs no
surface), never a glass pill; a search with Cancel is GlassSearchBar,
placed on its own row (Cancel's slide narrows the glass: 16 captures over
250 ms each way; showsCancelButton: false costs none); page dots are
GlassPageControl(count:, controller:) over the PageView.minimizeBehavior: GlassTabBarMinimizeBehavior.onScrollDown) needs a GlassTabBarMinimizer
above both the scroll view and the bar. GlassScaffold is one; a Stack
built by hand wraps itself in one. Rebuild the bar only when its selection
or items change: a bare setState on it costs a capture.showGlassSheet(detents: [GlassSheetDetent.medium, GlassSheetDetent.large]) to pull up to the whole height. At large the
default is opaque and reads no backdrop (one surface fewer captured), but
then a change inside the sheet is a retake; pass a translucent
largeFinish for content that animates.GlassConcentric.radius(outer, inset) / .borderRadius(outer, insets),
never a hand-picked radius.GlassButton swells under a press (GlassPress, 12 px): two captures a
press, none at rest. GlassPress.none on GlassHost.press, a
GlassTheme or one button turns it off. Never fake a press with a
Transform or AnimatedScale around glass.| Need | Use | Reference |
|---|---|---|
| App-wide capture and config | GlassHost | foundations/host |
| Custom glass shape, lens, panel | GlassSurface | foundations/surface |
| Radius of a shape nested in glass | GlassConcentric | foundations/surface |
| Button press swell, or none | GlassPress | components/button |
| Material: regular, clear, frosted, custom tint | GlassFinish | foundations/finishes |
| Label colour, subtree finish/tier/backdrop | GlassTheme, GlassThemeData | foundations/legibility |
| Glass reads its own backdrop | GlassAdaptive | foundations/adaptive |
| Reduce transparency, low-end, fallbacks | GlassTierPolicy, GlassTier | foundations/tiers |
| Touch wave | GlassRipple | foundations/ripple |
| Held-drop stretch/squash | GlassDropMotion | foundations/drop-motion |
| Surfaces that fuse into one silhouette | GlassGroup, GlassUnion | foundations/groups |
| Moving glass without captures | GlassTravel | foundations/travel |
| Glass refracting sibling glass | GlassAbove | foundations/above |
| Video, platform view, map under glass | GlassProxy | foundations/capture |
| Fixed colour, gradient or wallpaper: skip the capture | GlassBackdrop | foundations/backdrop |
| iOS scroll-edge blur under a bar | GlassScrollEdge | foundations/scroll-edge |
Cost, surface count, GlassLedger | — | foundations/performance |
| Top/bottom navigation capsule | GlassBar | components/bar |
| Standalone tappable glass | GlassButton | components/button |
| Floating content panel | GlassCard | components/card |
| On/off | GlassSwitch | components/switch |
| Continuous or stepped 0..1 value | GlassSlider | components/slider |
| Small count, one step at a time | GlassStepper | components/stepper |
Page dots over a PageView | GlassPageControl | components/page-control |
| 2–5 views/filters in one screen | GlassSegmentedControl | components/segmented-control |
| 2–5 app sections, collapsing on scroll | GlassTabBar, GlassTabItem, GlassTabBarMinimizer | components/tab-bar |
| Search with clear and Cancel | GlassSearchBar | components/search-bar |
| Single-line input | GlassTextField, .search | components/text-field |
| Unread count or dot on an icon or tab | GlassBadge | components/badge |
| Row of icon actions | GlassButtonGroup, GlassToolbarItem | components/toolbar |
| Confirmation | showGlassDialog, GlassAlert | components/alert |
| Bottom sheet, medium or large detent | showGlassSheet, GlassSheetDetent | components/sheet |
| "More" menu of actions | GlassMenuAnchor, GlassMenuItem | components/menu |
| Panel of live controls from a button | GlassPopoverAnchor | components/popover |
| Glass that flows to a new child's size | GlassMorph | components/morph |
| Whole screen: bar, list, tab bar, FAB | GlassScaffold | components/scaffold |
Background: start/how-it-works (what triggers a capture), start/declarations (everything the app declares), start/platforms (renderers, web), start/installation, start/common-errors (symptom, cause and fix for missing glass, holes, grey boxes, captures on every frame, and every debug message the package prints).
Each reference has the guide, a complete runnable example, and the full parameter table. Read the one for the widget you are about to use before writing it; do not guess parameter names.
// Menu from a bar button, then a confirmation.
GlassMenuAnchor(
items: <GlassMenuItem>[
GlassMenuItem(label: 'Delete', isDestructive: true, onPressed: () => confirm(context)),
],
builder: (BuildContext context, GlassMenuController menu) => GlassButton(
onPressed: menu.open,
semanticLabel: 'More',
padding: EdgeInsets.zero,
child: const Icon(Icons.more_horiz),
),
);
Future<bool?> confirm(BuildContext context) => showGlassDialog<bool>(
context: context,
builder: (BuildContext context) => GlassAlert(
title: const Text('Delete?'),
message: const Text('This cannot be undone.'),
actions: <GlassAlertAction>[
GlassAlertAction(label: 'Cancel', isDefault: true, onPressed: () => Navigator.pop(context, false)),
GlassAlertAction(label: 'Delete', isDestructive: true, onPressed: () => Navigator.pop(context, true)),
],
),
);
// A bar over a list of glass cards: lift it so it refracts them.
const GlassAbove(child: GlassBar(child: Text('Cards')));
// A video under glass.
GlassProxy.replace(
painter: const GradientProxyPainter(LinearGradient(colors: <Color>[Color(0xFF1B1F2A), Color(0xFFFF9F0A)])),
child: videoPlayer,
);
// A custom lens: clear, text-free, a circle.
const SizedBox.square(
dimension: 96,
child: GlassSurface(borderRadius: kGlassCapsule, finish: GlassFinish.clear, labelled: false),
);
flutter analyze must be clean; parameter names come from the references.GlassHost ancestor in the test tree as in the app;
modals need it above the Navigator.debugPaintGlassSurfaces = true outlines every surface in debug builds.GlassScope.maybeOf(context)?.read(viewSize: MediaQuery.sizeOf(context), model: GlassHardware.detect().surfaceCostModel).references/components/alert.md (opens in a new tab)references/components/badge.md (opens in a new tab)references/components/bar.md (opens in a new tab)references/components/button.md (opens in a new tab)references/components/card.md (opens in a new tab)references/components/menu.md (opens in a new tab)references/components/morph.md (opens in a new tab)references/components/page-control.md (opens in a new tab)references/components/popover.md (opens in a new tab)references/components/scaffold.md (opens in a new tab)references/components/search-bar.md (opens in a new tab)references/components/segmented-control.md (opens in a new tab)references/components/sheet.md (opens in a new tab)references/components/slider.md (opens in a new tab)references/components/stepper.md (opens in a new tab)references/components/switch.md (opens in a new tab)references/components/tab-bar.md (opens in a new tab)references/components/text-field.md (opens in a new tab)references/components/toolbar.md (opens in a new tab)references/foundations/above.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/g1455:g1455from g1455
npx claudepluginhub plugfox/g1455 --plugin g1455Other plugins' skills for the same job