frosted_host library

Frosted's host layer, for an app that shows the look's screens in a shell of its own: the scaffold every look shares (package:ui_core/host.dart: its tabs, its main action, its background and insets, the preview frame and platform) and Frosted's own part of it. An app that draws its screens from package:frosted_ui/frosted_ui.dart does not need this library; the look's own chrome, gallery and tests import it beside that one.

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

Classes

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.
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.
DisplayFormat
English display formats for amounts, counts and dates.
FrostedAccount
Who the app belongs to, as its chrome shows them: the initials in the avatar, the name and the quiet meta line ("Profile and settings") at the sidebar's foot, the unread count the bell wears, and where the avatar (onProfile) and the bell (onNotifications) lead. The app mounts one FrostedAccountScope above its router; the top bars and the sidebar read it, so no page passes the person around. profileLocation is the profile page's path: the sidebar's foot is current there (a :name segment stands for any one, so '/:root/profile' is the profile pushed on any root). notificationsLocation is the bell's page, where the sidebar marks nothing current, as the source's notifications do.
FrostedAccountMarks
The bell, then the avatar, of account, 8 apart: what a top bar wears at its end on a root (.top-r) and on a desktop detail. Plumbing of the bars.
FrostedAccountScope
Publishes the app's FrostedAccount to its chrome: mount one above the router (around the host's child), rebuilt when the person or the unread count changes.
FrostedBell
The bell of a top bar: a round button that opens the notifications, wearing the coral dot while unread is more than none and saying how many to a screen reader.
FrostedChromeMetrics
The bars, bands and parts of Frosted's chrome, in points.
FrostedHost
The one mount of Frosted in an app: picks the theme for the brightness in force and publishes it as a FrostedTheme (which installs what the platform's widgets under it read; a change of brightness or theme eases through AnimatedFrostedTheme), paints the ground behind the app, carries status-bar polarity, holds the toasts (FrostedToast.show) over the app, and clamps the text scale at maxTextScale so a large accessibility size grows rows rather than breaking them. Every render host mounts it once above its Navigator: the app in its router builder, a page preview in its own.
FrostedInventoryGallery
Frosted's inventory, listed: each group under its heading with how many of its rows Frosted carries, then each row in a FrostedCard, its class over its live specimen, or what a person calls the row over the reason Frosted leaves it out. It scrolls itself, so it fills a screen that does not scroll (FrostedScaffold(scroll: false)).
FrostedMediaGround
Stands child on the media ground: the host's dark tokens under a light status bar, for chrome drawn over a full-bleed photograph or video (the shell's bar on a media tab). Nothing in it blurs.
FrostedPage<T>
The Page for a route pushed off a root: it stands child on the theme's ground and moves as every page under FrostedTheme does, the same on every platform: it settles in as a pane laid on the page under it (24 px toward the end as it clears in, 300 ms; that page stands still) and lifts off the way it came. On iOS a drag from the start edge takes it back; under Reduce Motion it is a cut.
FrostedPreview
One page's isolated preview: the same host, bar, route and sheet the app gives the page live, without the router, so preview pixels match in-app pixels and the chrome the route derives is the real one: the way back when pushed, the close on a sheet. A pushed or sheet page is raised over a blank stage so its exit renders as it does live; a preview is looked at, not walked out of, so the exit leaves the page standing. A root stands over the tab bar on a phone; at desktop width a root and a pushed page stand beside the sidebar (tabs, activeIndex its current), as the shell stands every page there. Given the page's location, the sidebar marks the account's foot when the page is its profile.
FrostedSheetPage<T>
The Page whose route is Frosted's page sheet, created on the root navigator so it rises over the shell's bar. drawer stands it as tall as its content; fullScreen raises a full-screen cover on the ground instead, with no barrier, drawn as a pushed page whose exit is the close. Either publishes RoutePresentation.sheet around its child, so the screen inside derives its close, or with back the way back.
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).
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.
FrostedPresentation
How a previewed page stands in the app: as a nav root over the shell's bar, pushed off one, or raised as a page sheet.
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

PreviewPlatformDevice on PreviewPlatform
The platform's device, as data on the enum.

Properties

frostedInventory → DesignInventory
Every row of the shared inventory (INVENTORY.md, ui_core's DesignInventoryRow.all) as Frosted answers it: a live specimen of the row's Frosted<Stem> class, or the reason it is deliberately absent. The gallery lists it (DesignInventoryGallery); a test holds it whole (frostedInventory.verify()). The specimens read the theme, so build them under a FrostedHost.
final