glisse_flutter library

Apple's Liquid Glass for Flutter: a port of Glisse.

Classes

Glass
A pane of Liquid Glass: it bends what's behind it at its rim, frosts and tints it, and lights its edge, then shows its child on top.
GlassActionSheet
An action sheet of glass, as iOS's: a group of full-width rows parted by hairlines, and a cancel button below it.
GlassActionSheetAction
A row of a GlassActionSheet.
GlassActivityIndicator
iOS's activity indicator: spokes round a centre, the brightest one turning, each fading behind it.
GlassAlertDialog
An alert on glass, as iOS 26's: a rounded pane with a title, a message, and capsule buttons side by side when there are two, stacked otherwise.
GlassAvatar
A circle of glass showing a person: their picture, their initials, or an icon, with an optional status dot cut into its rim.
GlassAvatarGroup
A row of overlapping avatars, each cut away where the next one sits, with a glass "+N" after the first max.
GlassBackButton
A back button for a GlassNavigationBar: a chevron in a glass circle, or a capsule with a label.
GlassBackdrop
Content that glass above it refracts, on every platform.
GlassBackdropController
The copy of a GlassBackdrop's background, for the glass over it.
GlassBadge
A red badge at the top right of child, as on an app icon or a tab. It pops in on a bouncy spring when show turns on, and shrinks away when off. Without a label it's a dot.
GlassBannerController
A banner shown by showGlassBanner, to dismiss it early.
GlassBrightness
Lets an app's own theme (such as Material's) tell Glisse which page it is on, without building a full GlassThemeData.
GlassButton
A button of Liquid Glass, as iOS 26's: it swells and stretches under a finger and lights up at once when pressed.
GlassButtonGroup
Several buttons joined into one capsule of glass, as iOS 26's toolbars group them. Each GlassButtonGroupItem lights up on its own when pressed, and the capsule swells and stretches under the finger as one piece.
GlassButtonGroupItem
One button in a GlassButtonGroup: an icon, or a short label.
GlassCalendar
A month of days on glass, to pick a date from.
GlassCard
A padded panel of glass: an optional header row of leading, title over subtitle, and trailing, above a child.
GlassCheckbox
A checkbox of glass: a 22px rounded square that fills with the accent and draws a white tick in when checked. With tristate, null shows a dash.
GlassChip
A 32px capsule of glass for a filter, tag or choice. Selected, it fills with the accent and its label turns white. With onDeleted it shows a cross that removes it.
GlassColorSwatches
A row of round colour swatches of glass, wrapping onto more rows as needed; pick one as from radio buttons. The picked one springs a little larger and gets a ring round it, with a gap.
GlassContextMenu
A menu that a long press (or a right-click) on child opens, as iOS's context menus: the child lifts out of a blurred, dimmed page and a menu of items opens below it, or above it when there's no room.
GlassDatePicker
An iOS date picker on glass: month, day and year wheels side by side. The day keeps within the month, rolling back from the 31st to the 30th, say, when the month turns to one with fewer days.
GlassDialogAction
A button at the foot of a GlassAlertDialog.
GlassDisclosure
A section that opens and closes: a header row with a title and a chevron that turns to point down as the child grows into view below.
GlassDock
A dock of glass, as macOS's: its icons swell as the pointer nears them, each by how close it is, show their name while hovered, and bounce when opened. A finger dragged along it swells them too.
GlassDockItem
One app in a GlassDock.
GlassEllipsis
The ellipsis a GlassMenu's trigger shows by default: three dots.
GlassGlyph
Glisse's own small glyphs, drawn as its SVGs are: a 16-unit box, 1.5-unit round-capped strokes.
GlassInput
A text field on glass, as Glisse's Input: a 40px capsule whose frost brightens while it has focus, with an optional leading icon.
GlassKnob
A rotary dial of glass with an arc round it, filled with the accent up to its value.
GlassListSection
An inset grouped list on a card of glass, as iOS 26's settings: rows parted by hairlines that start where their text does, under a muted header and over a muted footer.
GlassListTile
A row of a GlassListSection: an optional leading icon, a title over a subtitle, and a trailing value or control. Tappable rows light up while pressed.
GlassLoupeRegion
A loupe that rises over a long press and follows the finger, as iOS's text loupe: a glass capsule a little above the finger, magnifying what's under the finger.
GlassMagnifier
A draggable glass lens that magnifies what's under it, as the magnifier on glisse.kelvinzhang.ca: its middle shows the backdrop enlarged, and its bezel bends the edge of that.
GlassMenu
A menu of actions behind a glass button, as iOS 26's: the glass grows out of the trigger while the rows scale up from its centre and come into focus. Held, the menu swells and follows the finger a little, and a plate slides between the rows under it; letting go over a row chooses it.
GlassMenuEntry
One entry of a GlassMenu: a GlassMenuItem or a GlassMenuSeparator.
GlassMenuItem
A row of a GlassMenu.
GlassMenuSeparator
A thin line between groups of a GlassMenu's rows.
GlassNavigationBar
iOS 26's floating top bar: no bar at all, but glass capsules for the leading and trailing buttons floating over the content, and a title between them.
GlassPageIndicator
Page dots in a small glass capsule. The current page's dot is a pill that flows between dots like a drop of liquid: it stretches towards the next page as page passes halfway, then lets go of the last.
GlassPicker
An iOS wheel picker: rows on a turning drum that fade towards its edges, the chosen one resting on a glass band across the middle.
GlassPinField
A one-time-code field: a row of glass boxes, one per character, over a single hidden text field. Characters pop into their boxes; the box awaiting the next one is outlined. A pasted or autofilled code fills every box at once.
GlassPopover
A card of glass that springs out of its anchor, below it or above it when there's no room, and closes on a tap anywhere else or on Escape.
GlassPopoverController
Opens and closes a GlassPopover from outside it.
GlassPressable
Makes its child press like iOS 26 glass: it swells under a finger, stretches towards a drag with a rubbery give, and springs back past its size when let go.
GlassPressableGlow
Lays PressGlow over its child while the nearest GlassPressable is pressed.
GlassProgressBar
A progress bar: a 6px rail with the accent filling it, lit along its top like glass. Without a value it shows a sweep, for work of unknown length.
GlassProgressRing
A ring of progress on a disc of glass.
GlassRadio<T>
A radio button of glass: a 22px circle that fills with the accent and springs a white dot in when selected.
GlassRange
A range of values, from start to end.
GlassRangeSlider
A slider with two knobs, picking a range: white knobs on GlassSlider's rail, the accent filling between them. The knobs can meet but not cross. A held knob lifts into a glass lens, as GlassSlider's does.
GlassRating
A star rating: a row of stars that fill with amber as far as value. Tap a star, or drag across them, to set it; the star touched pops.
GlassSearchField
A GlassInput for searching: a magnifier icon, a "Search" placeholder and a clear button.
GlassSegment<T>
One choice: a tab bar's tab, which may have an icon, or a segment.
GlassSegmentedControl<T>
A choice between a few options, as iOS 26's segmented control: a thumb on a glass track that, held or dragged, lifts into a lens over the labels.
GlassShaders
Loads and holds Glisse's shader. Widgets draw a fallback until it's ready.
GlassSidebar
A tall pane of glass listing destinations, as iPadOS and macOS 26's sidebars: the selection is a plate that springs from row to row.
GlassSidebarItem
One destination in a GlassSidebar.
GlassSlider
A slider, as iOS 26's: a white knob on a rail that, held, lifts into a glass lens showing the track thicker, as if magnified, bent at its rim.
GlassSlideToConfirm
A glass capsule with a round knob to slide across, for actions worth a second thought, as "slide to power off".
GlassSpring
A damped spring that eases a value towards a target, keeping its velocity when the target changes mid-flight, as Glisse's springs do.
GlassStepper
An iOS stepper on glass: a capsule split into − and +, each lighting up under a finger. Held, a half repeats, faster the longer it's held.
GlassStyle
How a piece of glass looks, beyond its shape.
GlassSwitch
An on/off switch, as iOS 26's: a white knob that, held, lifts into a glass lens bending the track under its rim, and can be dragged across.
GlassTabBar<T>
A row of tabs on glass, as iOS 26's tab bar: the selection springs between them, follows a drag, and lifts into a lens while held. Tabs with an icon show it above a small label, the selected one in the accent.
GlassTheme
Sets the GlassThemeData for the widgets below it.
GlassThemeData
The colours and tuning every Glisse widget reads, as Glisse's CSS custom properties (--lg-*) set them for a light and a dark page.
GlassTimePicker
An iOS time picker on glass: hour and minute wheels, with an AM/PM wheel unless use24hFormat. In 12-hour form, turning the hour past 12 turns AM to PM and back.
GlassToastController
A toast shown by showGlassToast, to dismiss it early.
GlassToolbar
A floating capsule of glass holding tools, as iOS 26's bottom toolbars: GlassToolbarItems inset 4px from its rim. Pressed anywhere, the whole capsule swells and stretches towards the finger, as a GlassButton does.
GlassToolbarItem
One icon in a GlassToolbar or GlassButtonGroup: a 44px circle with no glass of its own, lit while pressed, filled while selected. The glass around it swells and stretches under the finger, as one piece.
GlassToolbarSpacer
Room between groups of items in a GlassToolbar.
GlassTooltip
A small label of glass over its child, shown while a mouse rests on it or a finger presses it long.
HitPadding
Takes touches a little outside its child's box, without taking any more room: a bigger touch target for a small control, as a CSS ::before that hangs outside an element gives it.
LensLight
Where the light catches a lens's rim.
LensSpec
How a lens bends what's under it, as Glisse's LensOptions.
LiquidGlassBox
The widget for RenderLiquidGlass.
PressGlow
The soft light under a finger on pressed glass, as Glisse's ::after.
PressState
Where a press is and whether one is under way, for a pressable's glow.
RenderHitPadding
The render object of HitPadding.
RenderLiquidGlass
The render object behind every piece of Glisse glass: a rounded rectangle that bends, frosts, tints and lights what's behind it, then paints its child.

Enums

GlassAvatarStatus
The dot at the foot of a GlassAvatar.
GlassButtonVariant
How a GlassButton is filled.
GlassMenuAlign
Which edge of its trigger a GlassMenu lines up with as it opens across it.
GlassMode
How glass reads what's behind it.
GlassPopoverDirection
Which side of the anchor a GlassPopover prefers.
GlassQuality
How much work glass does to look its best.
LensRim
The rim a lens paints over itself.

Constants

glassMonthNames → const List<String>
The English month names a GlassDatePicker shows.
glassRatingAmber → const Color
The stars' default fill: a warm amber, as rating stars are on iOS.

Functions

showGlassActionSheet<T>({required BuildContext context, Widget? title, Widget? message, required List<GlassActionSheetAction> actions, GlassActionSheetAction? cancel, bool barrierDismissible = true, String semanticLabel = 'Actions', bool useRootNavigator = true}) → Future<T?>
Shows an action sheet that springs up from the bottom over a dimmed page, as iOS's do: a group of actions under an optional title and message, and a cancel button of its own below them.
showGlassBanner({required BuildContext context, required Widget title, Widget? message, Widget? leading, Widget? trailing, Duration duration = const Duration(seconds: 4), VoidCallback? onTap}) → GlassBannerController
Shows a card of glass that drops in from the top of the screen, as iOS's notifications do: a leading icon beside a title over a message.
showGlassDialog<T>({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, String barrierLabel = 'Dismiss', bool useRootNavigator = true}) → Future<T?>
Shows a dialog over a dimmed page: it springs in from a little larger, as iOS's alerts do, and fades away when dismissed.
showGlassSheet<T>({required BuildContext context, required WidgetBuilder builder, bool showHandle = true, bool isDismissible = true, bool enableDrag = true, EdgeInsetsGeometry padding = const EdgeInsets.fromLTRB(20, 4, 20, 20), bool useRootNavigator = true}) → Future<T?>
Shows a sheet of glass that floats up from the bottom, as iOS 26's: inset from the screen's edges, rounded all round, and dragged down to dismiss.
showGlassToast(BuildContext context, {required Widget message, Widget? icon, Duration duration = const Duration(seconds: 3), VoidCallback? onTap}) → GlassToastController
Shows a capsule of glass that springs down from the top of the screen, as iOS's banners do, and goes again after duration or when swiped up.