minimal_host library
Minimal'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 Minimal's own part of it. An app that draws its screens from
package:minimal_ui/minimal_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.pagemounts one inside a pushed page and inside a branch root (from its NavTab.ground); a system's chrome inside the page reads it. - DisplayFormat
-
The formatters. A design system re-exports this file from its own
format.dartand may name the class after itself (typedef ExpressiveFormat = DisplayFormat;), so page code readsExpressiveFormat.money(…). - 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.
- MinimalChromeMetrics
- Minimal's chrome geometry and motion, in one place: the bars, the rows, the controls, the sheet card and the transitions, as the build spec (docs/architecture/design-systems-bench-tactile.md §6) and its reference mockups state them.
- MinimalGroundScope
-
Stands child on ground: on MinimalGround.media, in the host's dark
tokens under a light status bar; on MinimalGround.surface, as it is. The
shell mounts one around its bar,
MinimalPage(ground:)one around a page. - MinimalHost
- The one mount of Minimal in a host app. Picks the theme for the brightness in force, installs it with a MinimalTheme (the dark theme riding along for media grounds, its page transitions on every platform), paints the ground, hosts the toasts (MinimalToaster), carries status-bar polarity, and clamps text scaling at MinimalChromeMetrics.maxTextScale (200%), the largest size its parts are laid out for. Every render host mounts it once above its Navigator: the app in its router builder, a page preview in its own.
- MinimalInventoryGallery
- minimalInventory listed in Minimal's own hand: each group under a section header counting the rows Minimal carries, each row its name in mono over its live specimen (a page in a card as tall as its bar and rows; a split in a card, and a side sheet, in a 220 px band; a scroll area and a palette in a card; a card across the column; a dialog, the sheets and a toast at their own widths; the floating parts with room for their shadow), and the gap's reason in place of one.
- MinimalMediaImage
-
Trusted image delivery for one declared media slot, shared by
MinimalMedia.media and MinimalAvatar's
media:: the bundledassets/media/<slot>.jpgfirst, else the durable linkassets/media/remote.jsonmaps the slot to. While a linked photo is still being made, fallback stands in under a slow sheen; the photo replaces it when it lands. A slot with neither, or a link that failed (404) or never landed within 15 minutes, shows fallback plain. A pending image never delays layout, first paint or publication. - MinimalMediaSource
-
A declared media slot's photograph as an ImageProvider, for the APIs
that take one rather than a slot id (a kit's
image:, a section'spicture:, a sample'simage: (name) => …), so no page loadsassets/media/by hand. -
MinimalPage<
T> - The go_router Page for a route pushed off a root: a page route that runs the page transition the host's theme installs (Minimal's push under MinimalHost), as Material's own page does.
- MinimalPreview
- One page's isolated preview: the same host, bar, route and card the app gives the page live, without the router, so preview pixels match in-app pixels. The route decides the page's chrome exactly as it does live: a root leads with its title, a pushed page gets the back button and breadcrumb, a sheet page stands in the card with its close.
-
MinimalSheetPage<
T> -
The go_router Page whose route is Minimal's page sheet: the modal
card (or, with
drawer: true, the edge-attached drawer), created on the root navigator so it rides above the shell's bar. In a wide window (MinimalBottomSheet.centresAt) the card stands centred over the page instead (MinimalBottomSheet.centredRoute); the drawer stays a drawer. A go_router route on the root navigator (parentNavigatorKey:) returns it from itspageBuilderwithkey: state.pageKey. - MinimalShellAction
- The app-level act beside the shell's tabs: the one thing reachable from every root — new issue, add, capture — with the glyph it wears, what it does, and the words a screen reader says for it. key is the walkthrough key of the declared step it performs.
- MinimalShellInsets
-
The bottom allowance the shell's bar asks every nav root to reserve:
published by
MinimalShellover its branch container (and by a preview that stands the bar under a lone page), spent by MinimalScaffold on its scroll padding and by showMinimalSnackBar on its inset. -
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.
- MinimalGround
- The ground a page stands on, which is what its chrome is drawn against: the theme's own surface, or media — a full-bleed feed of video or photographs.
- MinimalPresentation
- How a previewed page stands in the app: as a nav root over the shell's bar, pushed off one, or raised as a sheet.
- MinimalRouteChrome
- Which chrome a route position earns, read off the route itself: a nav root, a page pushed off one, or a page raised as a sheet. MinimalAppBar and MinimalScaffold derive their register from it, which is why a page never authors its own back or close control.
- 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
- minimalInventory → DesignInventory
-
Minimal in ui_core's shared inventory: each row's specimen is the
Minimal part that answers it, built with plain values, and the one
absent row says why. DesignInventory.verify checks every row is
answered; a DesignInventoryGallery shows them all.
final
Typedefs
-
MinimalMediaReference
= ({ImageProvider<
Object> ? image, String? slot}) -
What MinimalMediaSource.reference reads a picture value as: the declared
slotit stands for, or theimagethat draws it.