components library

Rendering-focused reusable UI components for DraftModeFramework apps.

Import this library for reusable cards, lists, rows, sections, buttons, dialogs, overlays, and other presentation primitives.

Classes

ColorRole
Pairs a background colour with its matching foreground/text colour.
DraftModeAdaptiveSectionConfig
DraftModeListItem<IdType, ValueType>
Lightweight data record used by DraftModeUIList.
DraftModeListItemBuilder
Convenience helpers for composing DraftModeListItem collections.
DraftModePageSpinnerPainter
CustomPainter legacy spinner painter kept for compatibility with tests and any downstream direct usage.
DraftModeUIBadge
Pill-shaped badge used to surface counts or short labels.
DraftModeUIBadged
Wraps child with a positioned DraftModeUIBadge when badge is provided.
DraftModeUIButton
A platform-adaptive button that renders as CupertinoButton on iOS and a framework-owned Material button family on Android.
DraftModeUIButtonPresets
Predefined button presets for common actions.
DraftModeUIButtons
Convenience accessors for platform-aware icons.
DraftModeUICalendar
Rendering-focused pair of date/time controls for range-style UIs.
DraftModeUICard
A standalone info card with an optional icon, bold headline, and body text.
DraftModeUIDateTime
Native-looking inline date/time control with iOS-style day-grid selection.
DraftModeUIDateTimeController
Controller used to coordinate which date/time panel is currently expanded.
DraftModeUIDateTimeline
Decorative vertical timeline gutter used beside grouped date/time rows.
DraftModeUIDialog
Platform-aware confirmation dialog that falls back to sensible defaults.
DraftModeUIDropDown<ItemType>
Platform-aware disclosure that surfaces a selection picker.
DraftModeUIDropDownField
Inline presenter for a DraftModeUIDropDown selection.
DraftModeUIDropDownMenu
A positioned overlay menu anchored to the calling widget's location.
DraftModeUIDropDownMenuItem
Single menu item displayed inside a DraftModeUIDropDownMenu.
DraftModeUIDropDownScreen<ItemType>
Shared picker content surface used by DraftModeUIDropDown.
DraftModeUIErrorText
Shared validation-message presenter for field-style controls.
DraftModeUIField
Reusable adaptive text field presenter for DraftMode UI surfaces.
DraftModeUIInsetCard
A freeform inset surface that keeps the framework's page spacing but lets callers provide arbitrary child content.
DraftModeUIList<ItemType>
Platform-aware grouped list with DraftMode's row styling baked in.
DraftModeUIListDismissible<ItemType>
Configures swipe-to-dismiss behavior for DraftModeUIList.
DraftModeUIListDismissibleDelete<ItemType>
Preset trailing delete action for DraftModeUIList rows.
DraftModeUIListText
Convenience list for rendering plain text rows with DraftMode spacing.
DraftModeUIRow
Displays a form row with an optional leading label and adaptive padding.
DraftModeUISection
Groups related form rows into a platform-adaptive container.
DraftModeUISectionScope
Exposes contextual hints for descendants rendered within a DraftModeUISection.
DraftModeUISegmentedControl<T extends Object>
Adaptive segmented control with a stable DraftMode surface.
DraftModeUISegmentedControlField<T extends Object>
Labeled segmented-control presenter with shared error-message handling.
DraftModeUISpinner
Lightweight activity indicator used while loading page content.
DraftModeUISwitch
Adaptive switch that mirrors the native control for the active platform.
DraftModeUISwitchField
Labeled switch row built from the shared switch and row presenters.
DraftModeUITheme
Provides DraftModeUIThemeData to descendant widgets.
DraftModeUIThemeData
All design tokens consumed by DraftModeFramework UI widgets.
DraftModeUITimelineButtons
Convenience access to timeline-specific icons.
DraftModeUITimelineInsertRow
Plus-style insert row that keeps the timeline visually connected.
DraftModeUITimelineRow
Reusable row layout that combines the timeline gutter with row content.
DraftModeUITimelineText
Text-first content block commonly used with DraftModeUITimelineRow.
DraftModeUIToast
Ephemeral overlay message displayed at the bottom of the screen.

Enums

DraftModeUIButtonSize
Semantic button size tokens.
DraftModeUIButtonVariant
Semantic button colour variants resolved at build-time from the theme.
DraftModeUIDateTimeMinuteInterval
Minute granularity used by DraftModeUIDateTime.
DraftModeUIDateTimeMode
Display modes supported by DraftModeUIDateTime.
DraftModeUIDateTimePanel
Expansion panels available on the inline date/time control.
DraftModeUIDialogStyle
Visual style applied to a DraftModeUIDialog.
DraftModeUIListInteractionStyle
DraftModeUIToastStyle
Colour scheme applied to a DraftModeUIToast.

Typedefs

DraftModeUIDropDownFieldBuilder = Widget Function(BuildContext context, Widget itemContent, VoidCallback? onTap)
DraftModeUIListConfirmDismiss<ItemType> = Future<bool?> Function(ItemType item, DismissDirection direction)
DraftModeUIListDismissedCallback<ItemType> = void Function(ItemType item, DismissDirection direction)