gloss_parts library

Helpers for customizing components copied from gloss_ui.

Import this library in the copied widget to use its theme and component helpers.

import 'package:gloss_ui/gloss_parts.dart';

Outside semver: this library may change in any version, a patch included; the CHANGELOG says how to move.

Classes

AnimatedGlossSurface
GlossSurface that moves to each new face on a spring from wherever it is: a press, a release, a focus, a latch. A press sinks on Gloss's press spring and returns with a little give; a change of glaze runs without overshoot. Under Reduce Motion it is a short fade, as DesignMotionPolicy says.
AnimatedGlossTheme
GlossTheme that moves to each new data over duration, as AnimatedTheme does: day to night, one gel to another. Under Reduce Motion it changes at once.
ChromeGroundScope
Publishes the ChromeGround of the page it wraps. ChromeRoutes.page mounts one inside a pushed page and inside a branch root (from its NavTab.ground); a system's chrome inside the page reads it.
DefaultDesignLocalizations
The words in English, with no localizations package.
DesignAdaptiveShell
An app's frame: destinations in a bar, a rail or a sidebar by the shell's width (DesignNavigationMode.fromWidth, or mode), and the app's body beside it (above a bar). The look paints each destination (destinationBuilder) and the navigation round them (navigationBuilder); the shell gives them their keys, their meaning to a screen reader and their place.
DesignAnchoredOverlay
A surface anchored to anchorBuilder's widget: a popover (DesignOverlayTrigger.press, focusOnOpen), a hover card (DesignOverlayTrigger.hover) or a menu (arrowKeyNavigation on).
DesignBandScale
Categories side by side (bars): count bands from start to end, paddingInner of each step between bands and paddingOuter at the ends. A value is a band's index; map gives its centre.
DesignBottomSheetController
Drives an open DesignBottomSheetRoute's size from outside it, as DraggableScrollableController drives a sheet, on the route's spring. The caller makes it, gives it to one route at a time, and disposes it.
DesignBottomSheetDetails
What a DesignBottomSheetRoute's panel paints from.
DesignBottomSheetDragHandle
A bottom sheet's drag handle, painted by builder: a button that moves the sheet to its next size (from the largest back to the smallest; a sheet of one size closes), Up and Down to a larger or smaller size when focused, and a screen reader's increase and decrease. Put it in a DesignBottomSheetRoute's panel.
DesignBottomSheetRoute<T>
A modal bottom sheet. Push it with Navigator.push; its panel is builder's, the screen's width, rising from the bottom edge.
DesignCalendar
One or more month grids over a DesignCalendarController.
DesignCalendarController
A calendar's state: the shown month, the keyboard's day and the selection.
DesignCalendarDay
One day as the grid paints it.
DesignCalendarHeader
A month's header, as DesignCalendar.headerBuilder gets it.
DesignCapCenter
Draws a one-line label or text entry so that the middle of its capitals is the middle of its own box, as Baseline puts a baseline where it is told.
DesignCarousel
Slides itemBuilder builds, itemCount of them.
DesignCarouselControls
What a carousel's controls act on.
DesignChart
A cartesian chart (line, area, bars, a sparkline): the look draws series from the scales and ticks in builder's details; the chart picks points, says them, and springs from one set of data to the next.
DesignChartDetails
A DesignChart as its look draws it.
DesignChartPoint
A point of a DesignChartSeries: x and y, or a gap where y is null.
DesignChartPointRef
A point of a chart: the indexth point of the seriesth series.
DesignChartSeries
A named run of points, in order along x.
DesignChartTable
A chart's data as a table, the alternative an app shows instead of the chart (a screen reader's "Show data table"): a row per x value, a column per series (DesignChartTable.new), or a row per slice with its value and share (DesignChartTable.slices). A screen reader reads a table, its column headers and cells, a missing value as "Empty"; cellBuilder paints each cell, and the columns are as wide as their widest cell.
DesignChartTableCellDetails
A cell of a DesignChartTable.
DesignColorArea
A saturation (across) and brightness (up) area for controller's hue.
DesignColorAreaDetails
What the look paints the area from.
DesignColorController
A colour being picked, as hue, saturation, brightness and alpha.
DesignColorPicker
An area over a hue slider (and an alpha slider), on one controller.
DesignColorSlider
A slider for one channel of controller's colour.
DesignCombobox<T extends Object>
A text field that suggests options as you type.
DesignComboboxField
The field, as DesignCombobox.fieldBuilder gets it: wire controller and focusNode to the look's text input, and submit to its onEditingComplete (and give it no onSubmitted; see submit).
DesignCommand
A command in a palette.
DesignCommandPalette
The palette's body: the field over the results. Put it in a route with showDesignCommandPalette, or anywhere (a sidebar's search).
DesignCommandShortcut
Opens a palette from anywhere under it on activators (Ctrl+K and Cmd+K).
DesignContextMenu
A menu of menuChildren that opens over child, where the user asks for it.
DesignControlBox
A control's box: at least minHeight tall, as wide as its child (or as the width it is told to be), with child placed by alignment and its text given even leading (TextLeadingDistribution.even).
DesignDataTable<R>
The rows of a DesignTableController's page under a header row, with one tab stop for the rows. The look paints the header cells, the cells, and each row around its cells.
DesignDateField
A date typed in segments, in the reader's order: value is a calendar day (its time ignored), null when empty; onChanged gets the day once every segment holds one, and null when one is cleared.
DesignDateRange
A range of days, start to end inclusive; end is null while only the start is chosen.
DesignDateSegmentDetails
One segment of a DesignDateField or DesignTimeField, as the look paints it.
DesignDensity
How compact a look's controls stand, as Material's VisualDensity: each step of vertical takes heightStep from a control's height and each step of horizontal paddingStep from its padding at either side, from -4 (tightest) to 4 (roomiest).
DesignDestinationDetails
What a look paints a destination from.
DesignDialog
An alert's or a simple dialog's layout: title and content scroll together over actions, which stay put. The actions sit side by side, sharing the row on a compact screen and aligned at the end on a larger screen. When their labels do not fit, including at a large text size, they stack, one to a line, the last given (the confirm) on top and the first (the dismissive one) at the bottom, as Material and iOS stack them.
DesignDialogAction
An action at the foot of a DesignDialog.
DesignDialogActionDetails
What the look paints a DesignDialogAction from.
DesignDialogDetails
What a DesignDialogRoute's builder paints from.
DesignDialogFrameDetails
What the look paints a DesignDialog's frame and action bar from.
DesignDialogRoute<T>
A modal dialog or alert. Push it with Navigator.push; its page is builder's, over a barrier.
DesignField
A control with its label, help and error.
DesignFieldParts
What a DesignField's builder lays out.
DesignForm
A Form that, on a submit that fails, shows every error, moves focus to the first field that is wrong (scrolling it into view) and tells a screen reader how many fields need attention; after that, errors update as the reader edits.
DesignFormField<T>
A FormField whose control DesignForm can focus: give focusNode to the control.
DesignFormState
The state of a DesignForm: submit and reset it.
DesignHaptics
The haptics ui_core's behaviours play: one callback per moment; a null callback plays nothing.
DesignHapticsScope
Puts haptics in force for child: the table every ui_core behaviour below reads with DesignHaptics.of.
DesignInputGroup
A field and its add-ons as one control.
DesignInventory
A look's inventory: one entry per DesignInventoryRow.
DesignInventoryEntry
A look's answer to one row: a live specimen (builder) or the reason the look leaves it out (absentReason).
DesignInventoryGallery
Lists an inventory, group by group in DesignInventoryRow.groups' order: each row's live specimen, or Deliberately absent: <reason> for a gap, or "Missing" for a row the inventory does not answer. Lazy: a row builds when it scrolls in.
DesignInventoryRow
One row of the inventory: a component every look either carries or leaves out with a reason.
DesignKeylineFace
Marks child as one face for the checks in package:ui_core_test: a control's face or a well (a field's, a list's, a table's) whose pixels may not show it, or a picture with things placed on it.
DesignKeylineRegion
Marks child as a card or a section whose contents share keylines: a keyline is the line that what starts a row (or ends one) sits on, so a card's title, its rows' words, its fields and its dividers start on one line, and its switches, chevrons and selects end on another.
DesignLinearScale
A number line: min at start, max at end.
DesignListDetail<T extends Object>
A list (listBuilder) and the detail of selectedItem (detailBuilder), as Compose's ListDetailPaneScaffold.
DesignLocalizations
The words a design system says on its own. The behaviours' words: the names a screen reader hears for a part with no text of its own (a carousel, a sheet's barrier, a split view's handle) and the messages they announce (a slide turned, a row moved, the results found), each also a parameter on its behaviour, which a null leaves to this. And the general words a look shows or says by itself (Cancel, Close, Today, Next month, "2 of 5"), under MaterialLocalizations' names where Flutter has the word, so a look built on any app (MaterialApp, CupertinoApp, WidgetsApp) has them.
DesignMenuBar
A row of menus.
DesignMenuEntry
An item of a menubar: a command, a submenu (children), or a divider.
DesignMotionPolicy
The Reduce Motion policy: which spring a component actually runs.
DesignNavigationDestination
A destination: its name and glyphs, as Material's NavigationDestination.
DesignNavigationDetails
What a look lays the navigation out from.
DesignNumberField
A number typed or stepped: value the number, null when empty; onChanged gets it as it is taken (Enter, the focus leaving, a step), not on each key typed.
DesignNumberFieldButtonDetails
One of a number field's step buttons, as the look paints it.
DesignNumberFieldDetails
The field, as DesignNumberField.fieldBuilder gets it: wire controller, focusNode, keyboardType, inputFormatters and onEditingComplete to the look's text input.
DesignOtpController
Holds a code: its text, its length, whether it is whole.
DesignOtpField
A one-time code drawn as boxes over one input.
DesignOtpSlot
One box, as DesignOtpField.slotBuilder gets it.
DesignOverlayAnchor
The anchor, as DesignAnchoredOverlay.anchorBuilder gets it.
DesignOverlayInfo
What DesignAnchoredOverlay.overlayBuilder paints the surface from.
DesignOverlayPadding
The edges a surface opened under it keeps clear of, beyond the screen's safe area and the on-screen keyboard: a look's own chrome over its pages, such as a desktop side bar a page's overlay runs under.
DesignOverlayPlacement
Where a surface goes relative to its anchor.
DesignPasswordController
Whether a password shows: true while it is hidden.
DesignPasswordDetails
What a DesignPasswordReveal's builder paints from.
DesignPasswordReveal
Holds whether a password shows and gives the field and its toggle what they need. The field keeps its focus and caret as it flips; with hideOnBlur a shown password hides again when focus leaves the field.
DesignPieChart
A pie or donut: the look draws slices from the angles in builder's details; the chart picks a slice, says it, and springs from one set of values to the next.
DesignPieChartDetails
A DesignPieChart as its look draws it.
DesignPieSlice
A slice of a DesignPieChart: a label and its value.
DesignPieSliceDetails
A slice as drawn.
DesignPressable
Makes any widget a control (press, focus, hover and what a screen reader hears), with no look of its own.
DesignPressableState
The state of a DesignPressable: states is what its builder was last given.
DesignPullToRefresh
child, a scroll view, refreshed by onRefresh on a pull.
DesignPullToRefreshState
The refresher's state: refresh runs one (a keyboard shortcut, a menu's "Refresh").
DesignRangeSlider
A slider of values between min and max.
DesignRangeTrack
The track's state, for the look to paint its rail and the filled part.
DesignRangeValues
A range's two ends.
DesignRating
A rating of itemCount items filled up to value (0, none, to itemCount): onChanged gets the value a tap, a drag, a key or a screen reader sets.
DesignRatingItemDetails
One item of a DesignRating, as the look paints it.
DesignRefreshDetails
What the look paints the indicator from.
DesignReorderableList<T extends Object>
A list of items the reader puts in order; onReorder gets an item's place from and its new place to (counted after it left).
DesignReorderItem
An item's place and moves, as DesignReorderableList.itemBuilder gets them.
DesignScale
Values to positions and back.
DesignScaleTick
A tick on a scale: a value, its position, its label.
DesignScrollArea
child, a scroll view on controller, with a scrollbar from thumbBuilder (and trackBuilder) on its end edge (or bottom).
DesignScrollThumb
A scrollbar's geometry and state, for the look to paint.
DesignSearchError
A search that failed, as a combobox's or a tag input's errorBuilder gets it: paint a message and a "Try again" (DesignLocalizations.retryButtonLabel) that calls retry, lit while focused.
DesignSheetInfo
What a side sheet's panel gets to paint with.
DesignSheetPageRoute<T>
A full-screen sheet presented as an opaque page of the navigator. The whole page rises on a spring and returns along the same path. With Reduce Motion it fades. Escape and Back respect the page's PopScope.
DesignSideSheetRoute<T>
A modal side sheet. Push it with Navigator.push; its panel is builder's, sized to width (at most the screen less minGap) and the full height.
DesignSpacing
The step a look's spacing stands on: every padding, gap and spacing token a multiple of grid.
DesignSpacingScope
Declares the spacing a look's parts stand on for the subtree, as a theme does; DesignSpacing.of reads it.
DesignSplitAction
An action in a split button's menu.
DesignSplitButton
A main action with a menu of actions beside it.
DesignSplitView
first and second side by side (or stacked, axis vertical), split at fraction of the room (the first pane's share).
DesignStyle
How one part of a look looks, as Material's ButtonStyle is: every slot resolves for the part's states (WidgetState.disabled, WidgetState.hovered, WidgetState.focused, WidgetState.pressed, WidgetState.selected, WidgetState.error).
DesignStyleOf
A part's style layers read at its states: its own style:, then its component theme (first wins). Each getter is the first layer's value for states, or null, so the part goes on to the theme-wide knobs and its own default.
DesignSwipeAction
An action behind a row.
DesignSwipeActionDetails
What the look paints an action from.
DesignSwipeActions
child with startActions behind its start edge and endActions behind its end edge.
DesignSwipeActionsController
Opens and closes a DesignSwipeActions row from outside, and says whether it is open, as flutter_slidable's controller does. The caller makes it, gives it to one row, and disposes it; with no row it does nothing.
DesignSwipeBackPageTransitionsBuilder
builder's page transition with iOS's swipe back from the screen's leading edge round it.
DesignTab
A tab: its name, and what a look paints it with.
DesignTabBar
A bar of tabs, controller choosing among them; the look paints each tab (tabBuilder) and the indicator under them (indicatorBuilder), or over them (indicatorPosition).
DesignTabController
Which tab is selected, and where a swipe or a change has got to: Material's TabController without Material. A DesignTabBar and a DesignTabView given the same one follow each other. The caller makes it, with a TickerProvider (TickerProviderStateMixin), and disposes it.
DesignTabDetails
What a look paints a tab from.
DesignTabIndicatorDetails
Where a look paints the indicator, and the selected tab's states.
DesignTableColumn<R>
A column of a DesignTableController.
DesignTableController<R>
A table's data and its view of it: the filter, the sort, the selection and the page.
DesignTableRow<R>
One row, as DesignDataTable.rowBuilder gets it.
DesignTabView
The pages of controller's tabs, one per tab, swiped between: Material's TabBarView without Material. Swiping moves the controller's DesignTabController.animation, so a bar's indicator follows the finger; let go, the pages spring to the nearer page (or the next, flung) on the controller's spring. A change from the bar springs the pages the same way. Each page is its tab's panel to a screen reader; pages off screen are not built, unless a page keeps itself alive.
DesignTagDetails
One tag, as DesignTagInput.tagBuilder gets it.
DesignTagInput<T extends Object>
Values chosen as tags, with a field that suggests and makes more.
DesignTapTarget
Lays child out at least minSize (the floor for what reaches the controls, DesignTapTargets.of, when null), placed by alignment, and sends a tap anywhere in that area to the child's centre: the control's layout, the area a tap reaches and the box a screen reader outlines are one.
DesignTapTargets
The least area a tap must reach on a control, by what reaches it: 44 by 44 for a finger (Apple's Human Interface Guidelines), 24 by 24 for a pointer (WCAG 2.2, success criterion 2.5.8, level AA).
DesignTapTargetScope
Declares the targets a look's controls stand at for the subtree, as a theme does; DesignTapTargets.of reads them.
DesignTextEntryBox
A text entry's box: at least minHeight tall, holding child, an editable as wide as the box, with one line centred in it and hint on the typed text's baseline while controller is empty.
DesignTimeField
A time of day typed in segments, on the reader's clock: value the time, null when empty; onChanged gets it once every segment holds one, and null when one is cleared.
DesignTimeOfDay
A time of day with no date: an hour (0–23), a minute and a second.
DesignTimeScale
Time, in local dates: min at start, max at end. Its values are milliseconds since the epoch (DateTime.millisecondsSinceEpoch); its ticks fall on calendar steps (seconds to years) and read as the reader's times and dates.
DesignToast
What a toast says and does. The look reads the fields it paints; data carries anything else it needs (a tone, an icon).
DesignToastDetails
What the look's DesignToaster.toastBuilder paints one toast from.
DesignToaster
Hosts toasts over child: put it above the app's navigator (WidgetsApp.builder), then call DesignToaster.of and DesignToasterState.show from anywhere below.
DesignToasterState
The state of a DesignToaster: show and dismiss toasts through it.
DesignToastHandle
A shown or waiting toast, as DesignToasterState.show returns it.
DesignToggleGroup<T>
A row (or column) of toggles over options.
DesignTooltip
A tooltip of message for child, painted by tooltipBuilder.
DesignTree<T extends Object>
The open rows of controller, one tab stop for all of them.
DesignTreeController<T extends Object>
A tree's nodes and which are open and selected.
DesignTreeItem<T extends Object>
A row's paint state.
DesignTreeRow<T extends Object>
A shown row of a tree.
DesignValueHandle
A focusable value between min and max.
DesignWheelColumn
One column of a DesignWheelPicker: its rows, their names and which of them can be chosen.
DesignWheelColumnDetails
One column of a DesignWheelPicker, as the look frames it: its lens, a band behind the centre row, a focus ring.
DesignWheelItemDetails
One row of a DesignWheelPicker, as the look paints it.
DesignWheelPicker
A wheel picker of linked columns: selection holds a row per column, columns gives the columns for a selection, and onChanged gets every pick as a whole, valid selection.
DisplayFormat
English display formats for amounts, counts and dates.
GlossAppShell
The app's places and its one act round a root page: GlossScaffold's bottom bar on a phone, its rail on a tablet, its sidebar on a desktop. The act is a jade gel key in the chrome, never floating over the page: the bottom bar's last cell on a phone, under the app's name at the head of the rail or the sidebar. An app on a router mounts it through GlossShell; a preview mounts it directly.
GlossAreaChart
A line chart with a translucent fill between each series and the baseline.
GlossAvatar
An avatar: a round pearl bead with a person's initials, or their picture under a clear lens with the top light on it.
GlossAvatarGroup
Avatars overlapping in a row, each ringed in the page's colour, the ones past max counted on a last pearl bead.
GlossBadge
A badge: a small ruby gel bead with a count, set on child's top end corner (or alone). Past max it reads max+.
GlossBanner
A banner: news that stays on the page until it is dealt with, on a level porcelain plate glazed in its tone, a socket at its start holding the tone's sign, and keys at its foot. A danger banner is announced as it appears.
GlossBar
A chrome surface: Gloss's bar glaze, its fine grain (painted once and reused; off under high contrast), its light along the top and its edge along the foot where it meets the page. The top bar, the bottom bar, the rail and the sidebar stand on it.
GlossBarChart
A bar chart that groups the series at each label. Axis labels use the ambient text scale and reading direction.
GlossBreadcrumb
A breadcrumb: the way down to here, each step a jade link, the steps parted by small chevrons engraved into the page, here in plain ink.
GlossButton
A Gloss key with its words: pearl by default, a jade gel key with GlossButton.filled for the one action a screen is for, and letterpressed words with GlossButton.text for the least. A press sinks the key 1.5 px and dims its shine; it comes back with a little give.
GlossButtonGroup
A row of pearl keys set side by side in one trough: a toolbar.
GlossButtonGroupItem
One key of a GlossButtonGroup.
GlossCalendar
A month calendar on porcelain: the month and its turning beads along the top, the weekdays letterpressed, the days as figures. The chosen day is a jade gel bead; today has a jade figure; a range is glazed pale jade between its two gel ends.
GlossCard
A Gloss card: an object's tile, level porcelain glazed onto the page, rounded 18, a light along its top and a soft shadow under it. Pressable with onTap: a press settles it into the page.
GlossCarousel
A carousel: slides in a sunken frame, a pearl bead each side to turn them and page dots between. A swipe turns them too; the arrows do once the frame has the focus.
GlossCheckbox
A Gloss checkbox: a rounded-square socket pressed into the surface; when checked, a jade gel insert fills it with a white check.
GlossChevron
The chevron of a field or key that opens a list: it turns over as the list opens.
GlossChevronPainter
The chevron a row that opens something ends with: a fine stroke pointing to the end side.
GlossChip
A Gloss filter chip: a small pearl key that latches. Chosen, it stays pressed in, its words and check lit jade.
GlossColorPicker
A colour picker: the saturation and brightness of the hue in a sunken frame, grooves for the hue (and the opacity), each with a clear bead holding the colour, and the colour itself in a bead with its hex code.
GlossColors
Gloss's colours, by role: the glazes its parts are moulded in, and the inks on them.
GlossCombobox<T extends Object>
A field that suggests as you type: the text field's well with the options in a porcelain list under it, as wide as the field. The pointer's row and the keys' row are one row.
GlossCommand
One command of a GlossCommandPalette.
GlossCommandPalette
A command palette: a search well over a list of commands, the best matches first. Up and Down move the lit row and Enter runs it, the focus staying in the well.
GlossCrumb
One step of a GlossBreadcrumb.
GlossDataColumn<R>
A column of a GlossDataTable.
GlossDataTable<R>
A data table: rows that sort by their headings, select, filter and page, on a porcelain card. The headings are letterpressed; a chosen row is glazed pale jade; the pages are a GlossPagination under it.
GlossDatePicker
A date field that opens a scrollable month calendar. Selecting a day closes the panel and calls onChanged.
GlossDateRange
A span of days, both ends counted.
GlossDateRangePicker
A date-range field that opens a scrollable calendar. Select a start day and an end day to close the panel and receive the range in onChanged.
GlossDescription
One line of a GlossDescriptionList.
GlossDescriptionList
Facts as term and detail, a line each, in a well with engraved lines between: on a phone the detail under its term, wider beside it.
GlossDestination
One of an app's places, for GlossNavigationBar, GlossNavigationRail and GlossSidebar.
GlossDialog
A Gloss dialog: a raised porcelain panel rounded 24, its title, its content and its keys at the foot's end, the confirm last. Its words scroll under fixed keys when long; the keys stack, the confirm on top, when they do not fit side by side (a narrow phone, large text). As it opens, focus goes to the safe key (Keep, beside a Delete).
GlossDialogAction
One of a GlossDialog's keys.
GlossDisclosure
A disclosure: a title that opens to child under it, its chevron in a small pearl bead turning over as it opens.
GlossDisclosureGroup
Disclosures stacked in one well, engraved lines between them.
GlossDivider
A line engraved in the page: a dark cut with the light catching its lower lip. GlossDivider.vertical stands upright.
GlossEngravedLine
The engraved line between a well's rows: a dark hairline with the light caught under it, indent in from the start side.
GlossEntryText
A line of words typed into a Gloss well: Gloss's body face, the jade caret, the hint in second ink, centred on the line's capitals.
GlossEntryWell
A one-line well: leading, the words, trailing, at a control's height, the text cursor over it and a tap anywhere on it putting the caret in.
GlossErrorState
When a page's data could not load: what happened, and one way forward (onRetry's key, or an action of the app's).
GlossFace
How a glazed face looks at one moment: what GlossSurface paints and what AnimatedGlossSurface moves between.
GlossFieldLabel
A field's label: text in the label face, 8 px above its field.
GlossFieldMessage
What stands under a field: its error in ruby (said as it appears), or else its helper.
GlossFile
A file chosen for a GlossFileDrop.
GlossFileDrop
A file drop: a deep tray pressed into the page, a glyph and a key to choose files in it, and the chosen files listed under it, each with its progress and a bead to take it out. The app does the choosing (onChoose).
GlossFocusHalo
Shows Gloss's focus halo (paintGlossHalo) over child while focused, brought in and out on Gloss's colour spring (a short fade under Reduce Motion): for a part that paints no GlossFace of its own, a slot's position, a list row, a plain glyph, a text button.
GlossFormField
Any control with its label, help and error, as one field: the label above it names it to a screen reader, the error under it is announced as it appears. A group of controls (a row or column of them, a segmented choice, a stepper, chips) keeps each control's own node and tap, and the label names the group (mergeSemantics).
GlossHost
The app's host, mounted once over its navigator (WidgetsApp.builder): Gloss's theme for the brightness asked for, its toasts and its porcelain page.
GlossHoverCard
A hover card: a pointer resting on child, or the keys' focus on it, raises a porcelain panel of content beside it after a moment: a preview of what a link or a name leads to. A long press opens it on a touch screen.
GlossIconButton
A round Gloss bead holding a glyph: pearl by default, jade gel with GlossIconButton.filled, or a bare letterpressed glyph with GlossIconButton.plain (on a bar, beside a field). selected latches a pearl bead in: it stays sunk and its glyph turns jade.
GlossInput
The plain one-line field: a GlossTextField with a hint or a label. On a page you write, use GlossTextField, which says more.
GlossInputGroup
A field with its add-ons, one control: a unit or a prefix engraved into the well's ends (kg, https://), or a glyph, a bead.
GlossInventory
The component examples in the Gloss inventory.
GlossKbd
A keycap that names a key on the keyboard (⌘, K, Esc), as a shortcut is written beside a menu row or in help.
GlossLineChart
A line chart with an engraved grid and a legend for multiple series. Axis labels use the ambient text scale and reading direction.
A link: jade words with a line under them, for a way somewhere else in running text or under a form. Under a press the words deepen and the line fills; the focus ring rounds the words.
GlossListTile
A row: title, a subtitle under it, a leading glyph, and at its end a trailingText value, a trailing control or a chevron when it opens something. A press shades the well's floor under it; selected seats a pearl plate in the well under the row, inset 4 px with its corners concentric with the well's.
GlossLoadingState
While a page's data is on its way: the spinner over its word, centred.
GlossMedia
A picture set in a sunken frame, the top light glazing it; with no picture yet, the frame's floor with a picture glyph pressed into it.
GlossMenu
A menu: builder's key opens a porcelain panel of items under it. Down on the key opens it too; Up and Down move through the rows, Home and End go to the ends, Escape closes it and gives the key its focus back.
GlossMenuBar
A menubar: a level chrome strip of menus for a desktop window. A press or the keys open a menu, and while one is open the pointer moves along the bar to open the others; Left and Right move between menus.
GlossMenuBarMenu
One menu of a GlossMenuBar.
GlossMenuItem
One row of a GlossMenu.
GlossMenuList
The rows of an open menu: the pointer's row is the keys' row, and a press closes the menu before the row's action.
GlossMenuPanel
The raised porcelain panel a menu's rows stand on, scrolling past maxHeight; as wide as its widest row, at least minWidth.
GlossMenuRow
A row on a Gloss menu's panel for its states: clear at rest, a pale glazed plate under the pointer or the keys, pressed into a well under a press. Menus, the menubar and the split key's list draw their rows with it.
GlossMeter
A meter: how full something is, as jade gel standing in a groove, turning ruby past high. Its label and value read above it.
GlossMetrics
The look's constants: its corners, its depths and its light. They are not settings: one light from the top and parts moulded at these radii are what Gloss is.
GlossMotion
Gloss's motion: springs, run through DesignMotionPolicy, which honours Reduce Motion. Moulded parts settle: a key returns with a small give, a bead snaps through and settles, a panel rises and stops.
GlossNavigationBar
A Gloss bottom bar: the grained chrome along a phone's foot, one place per slot; the current place sits in a pocket pressed into the bar.
GlossNavigationRail
A Gloss rail: the grained chrome down a tablet's start side, the places stacked, the current one in a pocket pressed into it.
GlossOtpField
A one-time code: a socket for each character, pressed into the porcelain, the next one ringed. Paste fills them all.
GlossPage<T>
The router's page for a route pushed over a root: its screen on the porcelain, changed in Gloss's way (GlossPageTransitionsBuilder): it rises a short way into place on a settling spring while the page under it sinks back and dims; going back is the reverse. On iOS it pops with iOS's swipe back from the leading edge too. A go_router route's pageBuilder returns it with the route's state.pageKey.
GlossPageDots
Page dots: a small socket for each page pressed into the surface, the current one a lozenge of jade gel. With onChanged each dot goes to its page.
GlossPageTransition
The motion GlossPageTransitionsBuilder plays, for a route of one's own.
GlossPageTransitionsBuilder
Gloss's push and pop, for a PageTransitionsTheme (an app's own, through glossPageTransitions).
GlossPagination
Pagination: the pages set in a trough, the current one standing up as a pearl key with jade figures, chevron beads at the ends. Runs of pages far from here fold to an ellipsis.
GlossPasswordField
A password field: the text field's well with a bead at its end that shows and hides the words, keeping the caret where it was.
GlossPieChart
A donut chart showing each slice and its value in a legend. The total appears in the center. The legend moves below the ring when its labels need the full width.
GlossPlaceSwitch
A switch between places (a bottom bar's, a rail's or a sidebar's): the place left fades as the new one rises 8 px out of the page and its glaze comes up, on the settling spring's curve. Under Reduce Motion only the fade stays.
GlossPopover
A popover: builder's key opens a porcelain panel of content beside it, for a few controls or words that belong to the key (share, a quick edit). Focus goes in and stays in until it closes; Escape or a press outside closes it.
GlossPreview
One page alone, as the app stands it: the same host, the same places and act on a root, the same route on a pushed page or a sheet, with no router.
GlossProgressBar
A progress bar: jade gel filling a groove pressed into the page, its sheen along the top. With no value a slug of gel slides along it.
GlossPullToRefresh
Pull to refresh: a pull down past the top lowers a pearl bead with an arrow that turns jade gel once letting go would refresh, then a spinner while onRefresh runs, then a tick.
GlossRadio<T>
A Gloss radio: a round socket; the chosen one holds a jade gel bead.
GlossRangeSlider
A range slider: two pearl beads in one groove, jade gel lit between them. A drag moves the nearer bead; the keys move the focused one.
GlossRangeValues
A range's two ends.
GlossRating
A rating: max stars, the ones given cast in jade gel, the rest engraved in the page. ui_core's rating runs it: a press gives that many (a press on the last star given takes it back), a drag sweeps across; one tab stop, Right and Left change it by one (as drawn), Home clears it, End gives all, a digit gives that many; a screen reader hears a slider.
GlossReorderableList<T extends Object>
A reorderable list: rows in a well, engraved lines between, each with a grip pressed into its start. A drag on the grip (or a long press) lifts the row out of the well as a porcelain plate to set down elsewhere; a screen reader moves rows with its actions.
GlossScaffold
A page with its places: a GlossNavigationBar under it below 600 px of window, a GlossNavigationRail beside it to 1024, a GlossSidebar past it; topBar over body either way.
GlossScreen
A page: its topBar (a pushed page's way back stands in it), its body on the porcelain in the page's margins, no wider than 1080 px, and its footer fixed at its foot under a hairline: the page's one gel key in reach. In a sheet it is as tall as its content allows and stands on the sheet's glaze.
GlossScrollArea
A scroll area: child scrolling with a pearl bead for its thumb in a groove along its edge, shown while it scrolls or the pointer is near. The keys scroll it once it has the focus.
GlossSearchField
A search field: a round-ended well with a magnifier at its start and, once there are words, a bead that clears them.
GlossSectionHeader
A section's head: its words letterpressed into the page, in sentence case, 8 px above the well it heads, on the rows' keyline.
GlossSegment<T>
One choice of a GlossSegmentedButton.
GlossSegmentedButton<T>
A Gloss segmented control: a capsule trough pressed into the surface, one equal slot per choice, and one jade gel thumb that slides to the chosen slot. Labels never move; the chosen one turns white on the gel.
GlossSelect<T>
A Gloss select: a field well showing the choice, a pearl dial bead at its end; a press opens the choices on a porcelain panel under it (above it when the room is there), the chosen one checked in jade and in view.
GlossSelectItem<T>
One choice of a GlossSelect.
GlossSeries
One series of figures in a chart.
GlossSheetAction<T>
One of an action sheet's keys.
GlossSheetPage<T>
The router's page for a route raised as a sheet: its screen on a glazed panel risen from the bottom edge, a grip pressed into its top, edge to edge on a phone and framed, 560 wide, from 600. It stands at most 88% of the screen tall, or as tall as its content when drawer; fullScreen raises a whole page instead. Its screen reads the route as a sheet (RoutePresentation.sheet), so the bar's way out is a close. A tap on the scrim above it, Escape or Back closes it. A go_router route's pageBuilder returns it with the route's state.pageKey.
GlossShellAction
The app's one act beside its places (add, plan, capture): a jade gel bead in the chrome when accent, a pearl one when not.
GlossSidebar
A Gloss sidebar: a grained panel down a desktop's start side, the places as rows; the current one stands on a pearl plate raised from the panel, its glyph jade. A pointer over a row shades it a breath.
GlossSkeleton
A skeleton: a shallow well where words or a picture will be, a soft sheen passing along it while it waits (still under Reduce Motion).
GlossSlice
One slice of a GlossPieChart.
GlossSlider
A Gloss slider: a groove pressed into the surface, lit jade up to the value, and a pearl bead the finger carries. Keys move it by divisions (or a hundredth), Page Up and Down by a tenth, Home and End to the ends.
GlossSpacing
Gloss's spacing, on a 4 px grid (DesignSpacingScope declares it).
GlossSparkline
A sparkline: a small thread of jade gel tracing values, a bead at its last figure. For a trend beside a number.
GlossSpinner
A spinner: a jade gel drop running round a ring groove pressed into the page. Under Reduce Motion it rests, a third of the way round.
GlossSplitButton
A key with its menu beside it: the main action on the left, a narrow key with a chevron that opens the others, moulded as one piece with a seam between. Gel when it is the screen's action (filled), pearl otherwise.
GlossSplitView
A split view: two panes with a groove between them and a pearl grip in the groove's middle; a drag on the groove, or the arrows once it has the focus, moves it.
GlossStateView
A whole place's state, in its middle: a large sunken socket holding its sign (smoke when empty, ruby when wrong, jade when done, a spinner while loading), what it means, and what to do.
GlossStepper
A Gloss stepper: a readout window pressed into the surface between two pearl beads, minus and plus, the beads as tall as the window (the control's height, or taller as the text grows). The count steps with a detent; the arrow keys step it too, and a screen reader hears it as an adjustable value.
GlossStepProgress
Step progress: a socket for each step, joined by a groove pressed into the page. Steps done fill with jade gel and a tick, the current one is a jade gel bead with its number, the ones to come are empty sockets. The groove fills with gel up to here.
GlossSurface
Paints face round child: its drop shadow (raised) or the rim's shade along its top (sunken), the rim, the glaze, the glow and the specular lens, and the focus halo round it all (paintGlossHalo).
GlossSwipeAction
One action behind a GlossSwipeRow.
GlossSwipeRow
A row with actions behind it: a swipe slides it aside to show them as gel blocks (ruby for one that destroys, jade otherwise); a full swipe does the outermost. A screen reader offers them as the row's actions.
GlossSwitch
A Gloss switch: a capsule slot pressed into the surface with a pearl bead in it. On, the slot lights jade from inside and the bead sits at the end; the bead snaps through and settles, and follows a finger dragging it.
GlossTab
One of an app shell's places as an app declares it: its glyph, its name and the key on its cell.
GlossTabBar
Gloss's tabs: a capsule trough pressed into the surface with equal slots, and a pearl thumb that slides to the current tab on a spring. ui_core's tab bar runs them: one tab stop, Left and Right (mirrored in right to left), Home and End move between tabs, and a screen reader hears "Method, Tab 2 of 2".
GlossTable
A table of words: a well, the headings letterpressed along its top, the rows parted by engraved lines. Narrower than its columns need, it scrolls sideways.
GlossTableColumn
A column of a GlossTable.
GlossTableController<R>
The rows, sorting, filtering, paging and selection of a GlossDataTable: make it in a State, dispose it there.
GlossTag
A tag: a small level enamel capsule naming a fact about a thing (Vegetarian, 3 left).
GlossTagInput<T extends Object>
Values held as pearl tags in a well, with a field after them that suggests and makes more. Enter, or a comma, makes the typed words a tag and keeps the focus for the next.
GlossTextArea
A field for a few lines of words (a note, a recipe's method): the text field's well, growing from minLines as the words run on.
GlossTextField
A Gloss text field: a well pressed into the page, rounded 12, the words on its floor. Focus rings it in jade, outside and concentric; an error rims it in ruby and says itself under it.
GlossTextTheme
Gloss's type: one face, Plus Jakarta Sans, in seven roles. A screen uses four at most.
GlossTheme
Gloss, installed: its theme, its tap floors, its spacing grid and its words for everything below. Put it once in an app's builder:, above the navigator, with a GlossToaster inside it.
GlossThemeData
Everything Gloss's parts read: colors, textTheme, density, and one part theme (GlossStyle) per part, each applied under a part's own style:.
GlossTime
A time of day, on a 24-hour clock.
GlossTimeline
A timeline: events down a groove pressed into the page, a socket at each; the ones done hold a jade gel bead.
GlossTimelineEntry
One event of a GlossTimeline.
GlossTimePicker
A time picker: drums for the hour and the minute (and the half of the day, on a 12-hour clock) in one well.
GlossToaster
Where Gloss's toasts float: put it once under GlossTheme, above the navigator, and call showGlossToast.
GlossToggle<T>
One choice of a GlossToggleGroup.
GlossToggleGroup<T>
Toggles set in one trough: what is on stands up as a pearl key, what is off lies flat in the trough. Any number at once (bold, italic) or one of several.
GlossTooltip
A tooltip: a pointer resting on child, the keys' focus on it or a long press shows message on a small smoke-gel capsule over it. Escape hides it; the pointer may move onto it and it stays.
GlossTopBar
A Gloss top bar: the grained chrome along a page's top, its title letterpressed at the start, a pearl back bead before it when onBack is given, and actions at its end. With large, the title stands under the bar in the headline face, on the page.
GlossTree<T extends Object>
A tree: nested rows with grooves down the levels, each branch opened by its chevron; the chosen row stands on a pale glazed plate with jade words. The arrows walk it, Right opens and Left closes.
GlossTreeController<T extends Object>
The nodes and the open and chosen state of a GlossTree: make it in a State, dispose it there.
GlossWell
A group of rows in a well pressed into the porcelain, rounded 16, an engraved line between rows from the words' keyline to the end. header is letterpressed above it, footer under it.
GlossWheelPicker<T>
A wheel: a glossy drum of items turning in a well, the chosen one under a clear lens across the middle. A drag or a fling turns it; Up and Down turn it a row.
MediaSlot
Where a slot's picture comes from.
MediaSlotImage
Trusted image delivery for one declared media slot, shared by a system's photo and avatar components. fallback stands in while the picture is pending and whenever it misses, so a pending image never delays layout, first paint or publication.
One tab of the shell's navigation: a branch's root, with the glyph and the words it wears. The runtime emits one per StatefulShellBranch, in branch order; the system decides how it looks.
PreviewDevice
The device a platform previews on: its logical size and pixel density. The oracle captures and the gallery's renders use the same numbers.
PreviewFrame
The frame a preview stands in: publishes its platform and brightness to everything inside it, scopes the platform override there, and publishes its box as the screen.
PreviewFrameData
What a PreviewFrame publishes to everything inside it.
PreviewStage
A stage that raises a previewed page on a route over itself once it is on screen, and keeps it raised: how a pushed or sheet page is previewed alone, so its exit renders as it does live and the chrome it derives is the real one (RoutePresentation.pushed or the sheet's).
RenderDesignCapCenter
The render object of DesignCapCenter: keeps its child's size and paints it moved up or down so that its one-line label's capitals sit on the box's middle.
RenderDesignTapTarget
DesignTapTarget's render object: its child laid out as given, itself at least minSize, the child placed by alignment, a hit anywhere in it sent to the child's centre.
RoutePresentationScope
Publishes the RoutePresentation of the route it stands in, overriding what the route's position implies. A system's sheet page wraps its child in one with RoutePresentation.sheet; a preview or a hand-built navigator may publish any presentation.
ShellAction
The app-level act beside the shell's tabs: the one thing reachable from every root — add, compose, capture — with the glyph it wears and what it does. A system draws it in its own way (a floating action button, a disc in the bar, a square at its end).
ShellInsets
The bottom inset the shell's bar asks every branch root to keep clear: published by a system's shell over its branch container (and by a preview that stands the bar under a lone page), spent by the system's screen on its scroll padding and by its toast on its inset.

Enums

ChromeGround
The ground a page stands on, which is what its chrome is drawn against: the system's own surface, or media — a full-bleed feed of video or photographs, over which the chrome is dark and solid.
DesignBranchBackBehavior
Where back goes from a branch at its root page.
DesignCalendarMode
How a calendar selects.
DesignChartXAxis
What a DesignChart's x values are.
DesignColorChannel
A channel a DesignColorSlider sets.
DesignDateSegmentType
The kinds of segment a date or a time field is typed in.
DesignInput
What reaches a look's controls: a finger, or a pointer (a mouse, a trackpad, a stylus that hovers).
DesignMenuLevel
Where a DesignMenuBar's builder paints: the bar, a menu or a submenu.
DesignNavigationMode
How a shell shows its destinations.
DesignOverlayAlign
How a surface lines up with its anchor along the side it sits on.
DesignOverlaySide
Which side of the anchor a surface sits on. start and end follow the text direction.
DesignOverlayTrigger
What opens an anchored surface.
DesignRefreshMode
Where a pull stands.
DesignScrollbarVisibility
When a DesignScrollArea's scrollbar shows.
DesignSelection
A page's selection, for its select-all checkbox.
DesignSheetEdge
Which edge a DesignSideSheetRoute comes from.
DesignSortDirection
Which way a column sorts.
DesignSplitPart
Which part of a split button a builder paints.
DesignToastClosedReason
Why a toast left.
DesignWindowSizeClass
Material's window size classes, by width in logical pixels.
GlossBannerTone
What kind of news a GlossBanner brings.
GlossKeyKind
A key's kind: pearl, jade gel, or letterpressed words.
GlossPluralCategory
The plural categories of CLDR: which form of a counted phrase a language uses for a count. English has one and other; Arabic has all six.
GlossPresentation
How a page stands in a GlossPreview.
GlossState
What a GlossStateView says about a place.
GlossTagTone
A tag's glaze.
PreviewPlatform
The platform a preview is drawn for: its device size and the platform whose behaviour applies inside it. The look is the system's everywhere; behaviour (scroll physics, back gestures, text handling) follows this platform.
RoutePresentation
How a route is presented, which is what a screen derives its bar from: the title on a root, the back affordance on a pushed page, the dismiss affordance on a sheet. A page never authors its own back or close; it reads its presentation (of).

Extensions

DesignSpringDrive on AnimationController
Runs an AnimationController on a spring instead of a duration.
GlossThemeContext on BuildContext
context.glossTheme: the GlossThemeData above.
PreviewPlatformDevice on PreviewPlatform
The platform's device, as data on the enum.

Constants

designSpringTolerance → const Tolerance
When a spring-driven controller counts as settled, in the controller's own units (a 0–1 progress, or dp for a position):
glossCapHeightFactor → const double
Plus Jakarta Sans's capitals as a fraction of its size (its OS/2 cap height, 745, over its 1000 units per em): what DesignCapCenter centres a label by.
glossCupertinoWords → const LocalizationsDelegate<Object?>
Cupertino's words for any locale: English. A text field's menu on iOS reads them.
glossFontFamily → const String
Gloss's one typeface: Plus Jakarta Sans, a friendly modern grotesk with a variable weight axis (200 to 800).
glossFontPackage → const String?
The package that bundles Gloss's face, or null when the app does. Every Gloss text style passes it as TextStyle.package.
glossMaterialWords → const LocalizationsDelegate<Object?>
Material's words for any locale: English.
glossPageTransitions → const Map<TargetPlatform, PageTransitionsBuilder>
Gloss's page change on every platform, for an app's own ThemeData: PageTransitionsTheme(builders: glossPageTransitions). On iOS the swipe from the screen's edge still pops a page, round Gloss's own push.
glossPanelCorner → const double
The corner of a floating list's panel.
glossPanelInset → const double
The inset between a floating list's panel and its rows, all round.

Functions

designMatchScore(String text, String query) → int?
How well query finds text: null not at all, higher better. A prefix beats a word's start, which beats a substring, which beats the letters in order.
designReduceMotionOf(BuildContext context) → bool
Whether the reader asked for reduced motion at context: Android's Remove animations or the web's prefers-reduced-motion (MediaQuery.disableAnimationsOf), or iOS's Reduce Motion (dart:ui's AccessibilityFeatures.reduceMotion, which MediaQuery does not carry).
designShortcutKeys(BuildContext context, MenuSerializableShortcut shortcut, {TargetPlatform? platform, bool appleSymbols = true}) → List<String>
The keys of shortcut (a SingleActivator or a CharacterActivator), one string a key, modifiers first, as Flutter's MenuItemButton labels them:
designShortcutLabel(BuildContext context, MenuSerializableShortcut shortcut, {TargetPlatform? platform, bool appleSymbols = true}) → String
designShortcutKeys joined as a menu row shows them: "⌃ ⇧ N" with Apple's symbols (Flutter's spacing), "Shift+Command+N" in words on macOS and iOS, "Ctrl+Shift+N" elsewhere.
designSpring({required double dampingRatio, required double stiffness}) → SpringDescription
The Flutter spring for the token (ζ = dampingRatio, k = stiffness): SpringDescription.withDampingRatio(mass: 1, stiffness: k, ratio: ζ), so damping = 2ζ√k. Compose's spring(dampingRatio, stiffness) is written against unit mass, so the two run the same curve.
designSpringSimulation(SpringDescription spring, {required double from, required double to, double velocity = 0, Tolerance tolerance = designSpringTolerance}) → SpringSimulation
The simulation of spring from from to to, starting at velocity units per second, that settles at tolerance and lands exactly on to.
designSwipeBack(Map<TargetPlatform, PageTransitionsBuilder> builders, {Set<TargetPlatform> platforms = const {TargetPlatform.iOS}}) → Map<TargetPlatform, PageTransitionsBuilder>
builders with the entries for platforms (iOS, by default) wrapped in DesignSwipeBackPageTransitionsBuilder, so a page there pops with a swipe from the screen's leading edge and otherwise plays the look's push.
glossEntryFace(GlossThemeData theme, Set<WidgetState> states, {Color? fill, Color? edge, double? radius}) → GlossFace
The well a field is typed in, for its states (focused, disabled, error), glazed by fill and rimmed by edge when a style gives them.
glossFocusOf(GlossColors colors, {required bool focused}) → Color
The keyboard focus halo's colour for colors, or clear when focused is false: a GlossFace's focus.
glossKeyFace(GlossThemeData theme, Set<WidgetState> states, {required GlossKeyKind kind, bool destructive = false, GlossStyle? style}) → GlossFace
The face of a key of kind in states: gel (ruby when destructive) or pearl, style over its part theme.
glossKeyPaint(BuildContext context, Set<WidgetState> states, {required GlossKeyKind kind, required String label, Widget? icon, bool destructive = false, GlossStyle? style}) → Widget
A pearl or gel key of kind reading label (after icon), painted in states; the pressable round it is the caller's.
glossKeyTheme(GlossThemeData theme, GlossKeyKind kind) → GlossStyle?
The part theme over a key of kind in theme.
glossLetterpress(TextStyle style, GlossColors colors) → TextStyle
The words of style letterpressed into a chrome surface in colors: a one-pixel light line below them by day, a dark line above them by night.
glossLoadFonts() → Future<void>
Loads the face Gloss bundles, so the first frame is set in it. Await it before runApp: on the web a bundled face otherwise arrives after the first frames, which flash in a fallback face.
glossOutline(Rect rect, double? radius) → RRect
The outline of a face laid in rect: its rounded rectangle of radius, or a capsule when radius is null.
glossPanelArrival(DesignOverlayInfo info, Widget child) → Widget
A panel's way in and out: it fades, and settles 6 px toward its anchor as it opens.
glossPanelFace(GlossColors c, {double radius = glossPanelCorner}) → GlossFace
The raised porcelain a floating list stands on, in c.
glossPlural(BuildContext context, int count, {String? zero, required String one, String? two, String? few, String? many, required String other}) → String
The form of a counted phrase for count in context's language (its Localizations locale, else English): one and other at least, and zero, two, few and many for the languages that have them. A form the language uses but the caller left out falls back to other.
glossPluralCategory(Locale locale, int count) → GlossPluralCategory
The category whole number count falls in for locale's language: the rules of the 30 languages ui_core speaks; any other language counts as English does.
glossRegisteredFamily(String family) → String
family under the name Flutter registers it by: PlusJakartaSans when the app bundles it, packages/gloss_ui/PlusJakartaSans from the package. A test that loads the face itself loads it under this name.
glossRowPlate(GlossColors c, {required bool lit, required bool pressed, double? radius = glossPanelCorner - glossPanelInset}) → GlossFace
A row's plate in a floating list, in c: clear at rest, a pale glaze when lit (the pointer's or the keys' row), pressed into a well under a press. Concentric with the panel: its corner is the panel's less the inset.
glossWeightAxis(FontWeight weight) → List<FontVariation>
The wght axis of Gloss's variable face set to weight: pass it with every fontWeight a style changes, so the face draws that weight.
paintGlossFace(Canvas canvas, Rect rect, GlossFace face, {bool highContrast = false}) → void
Paints face in rect on canvas: what GlossSurface draws, for a painter of one's own (a slider's groove, a switch's slot).
paintGlossHalo(Canvas canvas, RRect shape, Color color, {bool inside = false}) → void
Paints Gloss's keyboard focus round shape on canvas: an Aqua-like halo of color, a band of light against the part's edge that fades out into a soft glow, as if the glaze were lit from round its rim. color's alpha is how far the focus has come in; clear paints nothing.
showDesignCommandPalette({required BuildContext context, required DesignCommandPalette palette(ValueChanged<DesignCommand> run), Widget surfaceBuilder(BuildContext context, Widget palette)?, Color barrierColor = const Color(0x66000000), DesignBarrierBuilder? barrierBuilder, String? barrierLabel, AlignmentGeometry alignment = const Alignment(0, -0.6)}) → Future<void>
Opens palette in a modal route over a barrier; surfaceBuilder paints the panel around it. A command runs after the route has closed and focus is back where it was.
showGlossActionSheet<T>({required BuildContext context, required List<GlossSheetAction<T>> actions, String? title, String? message, String? cancelLabel}) → Future<T?>
Shows an action sheet: a few things to do with what was pressed, as pearl keys stacked on a porcelain panel rising from the foot, a cancel key apart under them. It closes with the pressed key's value, or null.
showGlossCommandPalette(BuildContext context, {required List<GlossCommand> commands, String? hint, GlossStyle? style}) → Future<void>
Opens the command palette over the page, a little above its middle, closing when a command runs, on Escape or on a press outside.
showGlossDialog<T>({required BuildContext context, required WidgetBuilder builder, bool isAlert = false, bool? barrierDismissible}) → Future<T?>
Shows the dialog builder makes over a dimmed page: it rises from 96% of its size on Gloss's panel spring and fades in. Escape or Back closes it, and a press on the page round it when barrierDismissible (null: a dialog yes, an alert no). An isAlert dialog asks for an answer: a screen reader hears an alert.
showGlossSheet<T>({required BuildContext context, required WidgetBuilder builder, String? title, WidgetBuilder? footerBuilder}) → Future<T?>
Shows a sheet builder fills: on a phone a porcelain panel rising from the foot, its top rounded 24 with a grip pressed into it; from 600 px a panel 560 wide set down over the page's foot. A drag down on the panel, a press on the dimmed page or Escape closes it.
showGlossSideSheet<T>({required BuildContext context, required WidgetBuilder builder, String? title, WidgetBuilder? footerBuilder, DesignSheetEdge edge = DesignSheetEdge.end, double width = 380}) → Future<T?>
Shows a side sheet builder fills: a porcelain panel the page's height sliding in from the reading end (or edge), rounded on its inner side, its title and a close bead at the top. A drag toward its edge, a press on the dimmed page or Escape closes it.
showGlossToast(BuildContext context, String message, {String? title, String? actionLabel, VoidCallback? onAction, Duration? duration = const Duration(seconds: 4)}) → DesignToastHandle
Shows message in a toast at the foot of the screen for duration (null keeps it until closed), with an actionLabel key that runs onAction.

Typedefs

DesignBarrierBuilder = Widget Function(BuildContext context, Animation<double> animation)
Paints a modal part's barrier in place of its barrier colour: a look's own screen over the page behind (Ben-Day dots, a blur, a grain).
DesignBottomSheetBuilder = Widget Function(BuildContext context, DesignBottomSheetDetails details)
Builds a bottom sheet's panel from details.
DesignCalendarDayBuilder = Widget Function(BuildContext context, DesignCalendarDay day, Set<WidgetState> states)
Paints one day for its states (WidgetState.selected when chosen, WidgetState.focused while the keyboard is on it, hovered, pressed, disabled).
DesignChartBuilder = Widget Function(BuildContext context, DesignChartDetails details)
Draws a chart from its details.
DesignChartFormat = String Function(double value)
Formats a value for labels, readouts and speech.
DesignChartTableCellBuilder = Widget Function(BuildContext context, DesignChartTableCellDetails cell)
Paints a cell of a DesignChartTable.
DesignComboboxFieldBuilder = Widget Function(BuildContext context, DesignComboboxField field)
Paints the field.
DesignDateFieldFrameBuilder = Widget Function(BuildContext context, Set<WidgetState> states, Widget segments)
Frames a date or time field's laid-out segments (its box, its focus ring); states are the field's: focused (a segment has the focus), hovered, disabled, error.
DesignDateLiteralBuilder = Widget Function(BuildContext context, String literal)
Paints the text between a field's segments ("/", ".", ":", Japanese's year mark U+5E74).
DesignDateSegmentBuilder = Widget Function(BuildContext context, DesignDateSegmentDetails details)
Paints one segment of a date or time field. A segment is a tap target: a look gives its face the floor (DesignTapTarget).
DesignDestinationBuilder = Widget Function(BuildContext context, DesignNavigationDestination destination, DesignDestinationDetails details)
Paints a destination.
DesignDialogActionBuilder = Widget Function(BuildContext context, DesignDialogAction action, DesignDialogActionDetails details)
Paints an action of a DesignDialog.
DesignDialogBuilder = Widget Function(BuildContext context, DesignDialogDetails details)
Builds a dialog route's page: the look's dialog, which details lets it move as the route opens and closes.
DesignDialogPartBuilder = Widget Function(BuildContext context, DesignDialogFrameDetails details, Widget child)
Wraps a part of a DesignDialog (its frame or its action bar) in the look's paint.
DesignDividerBuilder = Widget Function(BuildContext context, Set<WidgetState> states, Axis axis)
Builds a split view's divider for its states (focused while the keyboard is on it, hovered, pressed while dragged).
DesignFieldBuilder = Widget Function(BuildContext context, DesignFieldParts parts)
Lays out a field's parts.
DesignHandleBuilder = Widget Function(BuildContext context, Set<WidgetState> states)
Builds a handle's face for its states (focused while the keyboard is on it, hovered, pressed while dragged, disabled).
DesignInputGroupBuilder = Widget Function(BuildContext context, Set<WidgetState> states, Widget child)
Builds the group's frame around child (the field and its add-ons) for states: WidgetState.focused while anything inside has focus, WidgetState.hovered, WidgetState.disabled and WidgetState.error.
DesignInventoryGroupBuilder = Widget Function(BuildContext context, String group, int present, int total)
Builds a group's heading in a DesignInventoryGallery: present of total rows carried.
DesignInventoryRowBuilder = Widget Function(BuildContext context, DesignInventoryRow row, DesignInventoryEntry? entry, Widget? specimen)
Builds one row in a DesignInventoryGallery. entry is null when the inventory does not answer the row; specimen is the entry's live specimen, built, when it has one.
DesignListSurfaceBuilder = Widget Function(BuildContext context, Widget list)
Paints the list's surface around list (a panel, its shadow).
DesignMenuItemBuilder = Widget Function(BuildContext context, DesignMenuEntry entry, DesignMenuLevel level, Set<WidgetState> states)
Paints an item for its states (WidgetState.focused while the keyboard is on it, WidgetState.selected for the active menu title, hovered, pressed, disabled). In a menu whose highlight follows the pointer, one item at most is focused or hovered: the current one.
DesignMenuSurfaceBuilder = Widget Function(BuildContext context, DesignOverlayInfo info, List<Widget> items)
Paints a menu's panel round its items (scroll them when DesignOverlayInfo.maxSize is short): a menubar's menus, a context menu's.
DesignNavigationBuilder = Widget Function(BuildContext context, DesignNavigationDetails details)
Lays out and paints the navigation round its destinations.
DesignNumberFieldBuilder = Widget Function(BuildContext context, DesignNumberFieldDetails details)
Paints the field's text input.
DesignNumberFieldButtonBuilder = Widget Function(BuildContext context, DesignNumberFieldButtonDetails details)
Paints a step button: a look gives it a finger's floor (DesignTapTarget).
DesignNumberFieldLayoutBuilder = Widget Function(BuildContext context, Widget field, Widget decrement, Widget increment)
Lays out the field and its decrement and increment buttons.
DesignOptionBuilder<T> = Widget Function(BuildContext context, T option, Set<WidgetState> states)
Paints one option for its states: WidgetState.focused while it is highlighted (the keyboard's place in the list), WidgetState.selected when it is the combobox's value, WidgetState.disabled when it cannot be taken, and a pointer's hovered and pressed.
DesignOptionSearch<T> = FutureOr<Iterable<T>> Function(String query)
Searches for the options matching query.
DesignOtpContextMenuBuilder = Widget Function(BuildContext context, TextSelectionToolbarAnchors anchors, List<ContextMenuButtonItem> items)
Draws the field's edit menu: Flutter's toolbar arguments, so a look can hand them on (Material's AdaptiveTextSelectionToolbar.buttonItems, Cupertino's CupertinoAdaptiveTextSelectionToolbar.buttonItems) or draw its own. items is the Paste item (its label from its ContextMenuButtonType, in the app's language); pressing it pastes and closes the menu.
DesignOtpLayoutBuilder = Widget Function(BuildContext context, List<Widget> slots)
Lays out the boxes (a row; a look may put a dash in the middle).
DesignOtpSlotBuilder = Widget Function(BuildContext context, DesignOtpSlot slot)
Paints one box.
DesignOverlayAnchorBuilder = Widget Function(BuildContext context, DesignOverlayAnchor anchor)
Paints the anchor.
DesignOverlaySurfaceBuilder = Widget Function(BuildContext context, DesignOverlayInfo info)
Paints the surface.
DesignPaletteLayoutBuilder = Widget Function(BuildContext context, Widget field, Widget results)
A palette's list, as DesignCommandPalette.layoutBuilder lays it out.
DesignPieChartBuilder = Widget Function(BuildContext context, DesignPieChartDetails details)
Draws a pie chart from its details.
DesignPressableBuilder = Widget Function(BuildContext context, Set<WidgetState> states, Widget? child)
Builds a pressable's face for its current states (hovered, focused, pressed, disabled, selected, error). child is the pressable's own child, passed through so a face that does not change with state is built once.
DesignRatingItemBuilder = Widget Function(BuildContext context, DesignRatingItemDetails details)
Paints one item of a rating.
DesignRatingLayoutBuilder = Widget Function(BuildContext context, List<Widget> items)
Lays out a rating's items, in reading order.
DesignScrollbarBuilder = Widget Function(BuildContext context, DesignScrollThumb thumb)
Paints a scrollbar's thumb or track.
DesignSearchErrorBuilder = Widget Function(BuildContext context, DesignSearchError error)
Paints a failed search (error) in the list's surface.
DesignSwipeActionBuilder = Widget Function(BuildContext context, DesignSwipeAction action, DesignSwipeActionDetails details)
Paints an action.
DesignTabBuilder = Widget Function(BuildContext context, DesignTab tab, DesignTabDetails details)
Paints a tab.
DesignTabIndicatorBuilder = Widget Function(BuildContext context, DesignTabIndicatorDetails details)
Paints the indicator, laid out in DesignTabIndicatorDetails.rect.
DesignTableHeaderBuilder<R> = Widget Function(BuildContext context, DesignTableColumn<R> column, DesignSortDirection? sort, Set<WidgetState> states)
A sortable header, as DesignDataTable.headerBuilder gets it.
DesignTagBuilder<T> = Widget Function(BuildContext context, T value, DesignTagDetails tag)
Paints one tag.
DesignTagLayoutBuilder = Widget Function(BuildContext context, List<Widget> tags, Widget field)
Lays out the tags and the field (a wrap, by default).
DesignToastBuilder = Widget Function(BuildContext context, DesignToastDetails details)
Paints one toast.
DesignToastStackBuilder = Widget Function(BuildContext context, List<Widget> toasts)
Lays out the shown toasts, oldest first.
DesignToggleItemBuilder<T> = Widget Function(BuildContext context, T value, Set<WidgetState> states)
Builds an item's face for its states (selected, focused while the keyboard is on it, hovered, pressed, disabled).
DesignWheelColumnBuilder = Widget Function(BuildContext context, DesignWheelColumnDetails details, Widget wheel)
Frames one column of a DesignWheelPicker round its wheel.
DesignWheelItemBuilder = Widget Function(BuildContext context, DesignWheelItemDetails details)
Builds one row of a DesignWheelPicker.
GlossDensity = DesignDensity
How tight Gloss's controls stand: DesignDensity.standard (a 48 px control), DesignDensity.comfortable (44) or DesignDensity.compact (40). The default adapts: compact on a desktop, standard on touch. A control's tap target stays at the floor for the input whatever the density.
GlossForm = DesignForm
A form: GlossFormFields inside it are checked together, and a failed submit moves the focus to the first one that is wrong.
GlossSplitAction = DesignSplitAction
One action in a GlossSplitButton's menu.
GlossStyle = DesignStyle
How one part of Gloss looks, as Material's ButtonStyle is: every slot a WidgetStateProperty, read from a part's style: first, then from its part theme on GlossThemeData, then from the look's own default.

Exceptions / Errors

DesignInventoryError
Thrown by DesignInventory.verify: the rows an inventory answers wrong.