patterns library

Classes

UiAppBar
Simple top bar with title, leading and trailing slots.
UiAppShell
Generic app shell: optional top/bottom bars around a body.
UiBackSwipeLayeredMetrics
Parallax geometry constants used by the interactive back-swipe region in UiNavigationHost. Declared at the library level so tests can exercise the same numbers the implementation renders.
UiChatAttachmentTray
Inline attachment staging, intended for UiChatComposer's attachmentShelf. A single media preview keeps its natural ratio, batches scroll horizontally, and document rows scroll vertically. The conversation retains visible space.
UiChatComposer
Chat input row with attachment slot and send action.
UiChatComposerActions
Active composer mode; the host owns commands and recording/selection state.
UiChatDraftAttachment
A caller-owned unsent attachment. Media rendering and inspection stay with the application; omit mediaBuilder for a compact file/recording row.
UiChatHeader
Compact centered conversation title, with leading navigation and trailing avatar/actions. Grows with text scaling; callers provide localized labels and accessible action widgets.
UiChatMessage
A complete message row. Domain content, receipt derivation and reply targets stay application-owned; the kit owns spacing, avatar reservation, selection, bubble geometry and directional swipe-to-reply.
UiChatMessageGrouping
Neighbor-derived presentation shared by text and media. Neighbors are in chronological order; pass null across non-message events.
UiChatScaffold
Conversation page that owns safe areas, chrome measurement and IME avoidance.
UiChatTimeline
Conversation history composition using the existing anchor-preserving scroller. Items are oldest-first and retain their application IDs. Supply localized loading/empty/error and typing surfaces; state is application-owned.
UiChatTimelineEntry
An application message or event projected into presentation data. Event entries use isMessage false and break sender runs without losing their stable history ID. The builder receives ready-to-use grouping.
UiChatWorkspace<T>
Chat uses the kit's adaptive master/detail navigation directly: root routes on phones, overlay detail on tablets, and inbox/detail panes on desktop. Keeping the same controller preserves selection and navigation contracts.
UiCollectionPage<T>
Semantic collection page pattern.
UiContainerBackdropSpec
Configures the performance tier and appearance of a container backdrop.
UiContainerFlightReveal
Eases child in and out with the ambient UiContainerFlightScope progress instead of popping with the rest of the destination content.
UiContainerFlightScope
Live geometry exposed to content inside an Open UI container transform.
UiContainerPreview
Identifies the thumbnail/preview region inside UiOpenContainer's closedBuilder and the matching region inside its pageBuilder.
UiContainerTransformGeometry
Geometry shared by iOS-style source tiles and their route transition.
UiContainerTransformRoute<T>
A reversible route whose surface expands from sourceRect.
UiContainerTransformTransition
Geometry and reveal primitive used by UiContainerTransformRoute.
UiContentOcclusionSpec
Timing and material used to conceal a content identity swap during a container transform.
UiContentPage
A titled, vertically scrolling page composed from Open UI Kit navigation, safe-area, spacing, and refresh primitives.
UiContourAccessoryGeometry
Resolved geometry for one instant of an accessory-release transition.
UiContourAccessoryGeometryInput
Input to UiContourAccessoryGeometrySolver.solve.
UiContourAccessoryGeometrySolver
Deterministic, pure geometry for a persistent-chrome accessory release: a bar recedes by exactly the width an accessory claims, while that accessory grows from a source point inside the bar to an independent floating surface. See doc/contour.md.
UiContourAccessoryRelease
Persistent chrome releasing an independent accessory surface — the second Contour interaction model, distinct from UiContourRelease's single shared capsule.
UiContourActionGeometry
Resolved geometry for one instant of an action-release transition.
UiContourActionGeometryInput
Input to UiContourActionGeometrySolver.solve.
UiContourActionGeometrySolver
Deterministic, pure geometry for the in-place action-release interaction.
UiContourBarItem
One item shown in UiContourAccessoryRelease's persistent bar, besides the search trigger.
UiContourRelease
A trigger that releases a row of actions in place.
UiContourReleaseAction
One action released by a UiContourRelease trigger.
UiConversationLayout
A conversation viewport with floating header and composer surfaces.
UiDualPane<T>
Adaptive master-detail layout.
UiDualPaneController<T>
Selection controller for UiDualPane.
UiDualPaneScope<T>
Inherited access to a UiDualPaneController.
UiEdgeSwipePopRegion
Tracks a horizontal drag starting in the leading-edge strip and drives an interactive translation on child, calling onTriggered once the drag passes either the distance or velocity threshold on release.
UiFluidDismissRegion
Experimental: turns a drag anywhere on child into a media-viewer style carry of the page, publishing UiFluidDragState for the route transition to render.
UiFluidDragState
Finger-carried state of a fluid page: offset from the page's resting center and a 0..1 progress toward dismissal.
UiFluidOpenContainer
Experimental: a compact surface that opens its page with UiFluidPageRoute and hides itself while the page is open, so the in-flight copy is the only visible instance.
UiFluidPageRoute<T>
Experimental: a full-screen route whose page grows out of a source rect with the kit's fluid morph and shrinks back into it on pop.
UiFluidRouteTransition
Experimental geometry and reveal primitive used by UiFluidPageRoute.
UiFormPage
Semantic form page pattern.
UiMediaViewerPage
An edge-to-edge media page with canonical navigation over the content.
UiMessageBubble
Chat bubble surface.
UiNavigationBackButton
iOS-style back affordance: a chevron, with label kept for accessibility and the title of the long-press history menu even when it isn't painted. Set showLabel to restore the previous chevron-plus-title look for apps that still want it.
UiNavigationBackConfig
UiNavigationBackHistoryItem
UiNavigationBackPopTarget
UiNavigationController
A typed, router-agnostic navigation stack controller.
UiNavigationControllerScope
Runtime navigation context exposed by UiNavigationHost.
UiNavigationHost
Renders the current stack of a UiNavigationController.
UiNavigationScope
Exposes page-level navigation metadata to descendants.
UiNavigationSpec
Declarative metadata for a page's navigation chrome.
UiNavigationStack
Open UI Kit transition host for index-addressed page stacks.
UiNavigationTransition
Transition wrapper used by UiNavigationStack and by custom hosts.
UiNavigatorHistoryObserver
Tracks the full stack of top-level PageRoutes pushed through whichever Navigator this observer is attached to, plus a title registered by each page's own chrome — so UiSliverNavigationBar's long-press-back history menu can show the entire stack for apps using a plain Flutter Navigator (Navigator.push/pushNamed), the same way UiNavigationControllerScope already does for apps built on UiNavigationController.
UiNavigatorHistoryScope
Exposes the UiApp-owned UiNavigatorHistoryObserver to descendants — most directly UiSliverNavigationBar, which reads it as a fallback history source and registers each page's title against it.
UiOpenContainer
Connects a compact source surface to a full-page destination.
UiPageBodyInsets
UiPageLayout
Semantic page pattern built on UiPageScaffold.
UiPageRoute<T>
Open UI Kit's standard PageRoute: UiNavigationTransition visuals (default UiNavigationTransitionStyle.softShift — a fade + subtle shift + scale, not a plain cross-fade) with iOS's progressive edge-swipe-to-pop gesture layered on top via UiCupertinoBackGestureMixin.
UiPageRouteDefaults
App-wide fallback for UiPageRoute's style and swipe-back behavior. UiApp provides this from its own defaultPageTransitionStyle / defaultPageSwipeBackEnabled constructor arguments; BuildContext.pushUiPage reads it whenever a call doesn't override those explicitly, so changing the app-wide default and overriding a single push both work — one isn't an escape hatch that bypasses the other.
UiPageScaffold
Preferred page shell: coordinates background, top/bottom bars, safe viewport policy, and system bar syncing in a single widget.
UiProfileSummary
Centered profile summary pattern: avatar, primary name, optional subtitle, and optional action row.
UiRouteEntry
A single entry on a UiNavigationController stack.
UiRouteSpec<TArgs, TResult>
A typed route definition.
UiSafeViewport
Applies a predictable safe-area strategy for Open UI Kit pages.
UiScrollEdgeFade
Paints platform-adaptive fades over scrolling content.
UiSettingsGroup
UiSettingsItem
UiSettingsList
Grouped settings/action list pattern.
UiSliverCollection<T>
Section-aware sliver collection with adaptive one/two-column rows.
UiSliverNavigationBar
Sliver-based navigation bar with large-title collapse behavior.
UiSliverStickyRegion
A fixed-height page utility that pins as its content scrolls underneath.
UiSurfaceRegion
Visually-scoped surface region.
UiSystemBars
Applies a SystemUiOverlayStyle to the subtree via AnnotatedRegion.
UiSystemBarsStyle
Helpers for building SystemUiOverlayStyle values from a background color. Exposed so consumers can cache/reuse the result when they need the raw style object (e.g. to pass into an external AnnotatedRegion).

Enums

UiBackSwipeTransition
Interactive back-swipe transition style.
UiChatReceiptVisibility
UiCollectionLayout
UiContainerBackdropStyle
How the route behind an iOS-style container transform is separated from the expanding surface.
UiContainerFlightDirection
UiContainerPathMotion
Path used by the animated container bounds.
UiContainerSourceFlightLayout
How compact content participates in an iOS-style container flight.
UiContainerTransformStyle
UiDualPaneTabletMode
How a tablet-width master/detail surface should use constrained width.
UiMessageAuthor
Direction of a chat message.
UiMessageStatus
Ephemeral state flag for streaming/pending messages.
UiNavigationSurface
Visual treatment for the navigation surface.
UiNavigationTransitionStyle
Transition presets for navigation animations.
UiPageBodyInsetsAspect
Resting edge insets that page body scrollables should include in their content padding when UiPageScaffold.scrollFadeUsesSafeArea is enabled.
UiSafeViewportMode
Safe-area policy for a page subtree.
UiStickyRegionSurface
Surface treatment for UiSliverStickyRegion.

Mixins

UiCupertinoBackGestureMixin<T>
A PageRoute mixin that adds iOS-style interactive edge-swipe-to-go-back support to a route while leaving the visual page transition entirely up to the mixing class's own ModalRoute.buildTransitions override.

Extensions

UiFluidPageNavigation on BuildContext
Experimental: pushes builder on a UiFluidPageRoute that grows out of the widget identified by sourceKey.
UiNavigationHistoryX on UiNavigationController
Back-compat shim. toBackHistoryItems() forwards to UiNavigationController.historyItems — new code should call the controller method directly.
UiPageNavigation on BuildContext
Pushes builder on a UiPageRoute — Open UI Kit's standard page push.

Functions

uiChatShowsReceipt({required bool outgoing, required bool latestOutgoing, required UiMessageDeliveryStatus status, UiChatReceiptVisibility visibility = UiChatReceiptVisibility.latestOutgoing}) bool
Selects presentation only; the application derives delivery status.

Typedefs

UiCollectionItemBuilder<T> = Widget Function(BuildContext context, T item, int index)
UiCollectionSectionBuilder<T> = Widget? Function(BuildContext context, T item, int index)
Builds a header when item starts a new collection section. Return null when the item continues the current section.
UiContainerFlightBuilder = Widget Function(BuildContext context)
UiContainerPageBuilder = Widget Function(BuildContext context)
UiDualPaneBuilder<T> = Widget Function(BuildContext context, T? selected, void select(T? value))
UiOpenContainerBuilder = Widget Function(BuildContext context, VoidCallback open)