flint_ui_core library
Core component, node, style, storage, navigation, and widget APIs.
Import this from tests, shared component packages, and lower-level code that should use Flint UI primitives without directly depending on app mounting helpers.
Classes
- Alert
- Tone-aware alert surface for important status messages.
- AnimationDirection
- CSS animation-direction value.
- AnimationFillMode
- CSS animation-fill-mode value.
- AnimationIteration
- CSS animation-iteration-count value.
- AnimationPlayState
- CSS animation-play-state value.
- AppShell
- Two-column application shell with sidebar, optional brand, and topbar.
- AspectRatioBox
- Box that preserves a CSS aspect ratio.
- Audio
-
Native HTML
audioelement with Flint styling and media controls. - AuthSessionManager
- Stores and reads simple browser-side auth session state.
- AuthSessionSnapshot
- A read-only snapshot of the current browser auth session.
- AuthShell
- Authentication page shell with centered card content.
- Avatar
- Circular user avatar that renders an image or initials.
- Background
- CSS background value that can combine multiple layers.
- BackgroundClip
- CSS background-clip value.
- BarChart
- A customizable SVG-based Bar Chart widget for representing categories/metrics.
- Border
- Typed CSS border shorthand value.
- Box
- Low-level box element with common size, spacing, and surface props.
- BoxSizing
- CSS box-sizing value.
- BreadcrumbItem
- Item rendered inside Breadcrumbs.
- Breadcrumbs
- Breadcrumb navigation trail for hierarchical pages.
- BrowserStorage
- Base API for browser-backed key/value storage.
- Button
- Semantic button with Flint UI variants, tones, sizes, and loading state.
- ButtonGroup
- Inline container for grouping related action buttons.
- Canvas
- Native HTML canvas element with a Flint drawing controller.
- CanvasBounds
- Axis-aligned bounds for a retained canvas object.
- CanvasCircle
- Retained circle object.
- CanvasController
- Controller for Flint Canvas drawing.
- CanvasGuide
- Visual snap guide.
- CanvasImageObject
- Retained image object.
- CanvasImagePattern
- Image pattern fill for canvas shapes.
- CanvasLayerItem
- Layer-panel metadata for a retained canvas object.
- CanvasLine
- Retained line object.
- CanvasObject
- Base class for retained canvas objects.
- CanvasObjectConstraints
- Canvas object editing constraints.
- CanvasPaint
- Shared style for Flint canvas drawing operations.
- CanvasPointerEvent
- Pointer event payload for browser canvas interactions.
- CanvasRect
- Retained rectangle object.
- CanvasTextObject
- Retained text object.
- CapturedMedia
- Captured media ready for preview, upload, or storage.
- Center
- Flex container that centers child content on both axes.
- Checkbox
- Checkbox field with label, help text, and validation message support.
- ClientRouter
- Browser API client with Flint-style route grouping.
- Color
- CSS color value used by typed Flint UI styles.
- Colors
- Built-in color tokens for Flint UI examples and components.
- Column
- Vertical flex container.
- ConfirmAction
- Confirmation dialog for dangerous or deliberate user actions.
- ConstrainedBox
- Box that applies min/max size constraints.
- Container
-
Generic
divwrapper for grouping and styling content. - Cookies
- Reads and writes browser cookies for Flint UI apps.
- Cursor
- CSS cursor value.
- DartStyle
- Typed CSS style object for Flint UI components.
- DashboardShell
- Dashboard page shell built around AppShell and Topbar.
- DataTable
- Opinionated Table with default loading and empty states.
- DescriptionItem
- Label/value item rendered by DescriptionList.
- DescriptionList
- Semantic description list for label/value metadata.
- Divider
- Horizontal or vertical separator.
- DocsShell
- Documentation page shell with optional nav and sidebar.
- Drawer
- Slide-out dialog panel anchored to the left or right side.
- EdgeInsets
- Typed spacing value for CSS margin and padding.
- EmptyState
- Empty-state surface with title, message, icon, and action slots.
- EnvironmentConfig
- FieldGroup
- Groups related form fields under an optional title and description.
- Figure
-
Semantic
figureelement with an image and optional caption. - FileInput
- File picker field with label, help text, and validation message support.
- Flex
-
Typed CSS
flexshorthand value. - FlexWrap
- CSS flex-wrap value.
- FlintComponent
- Base class for reusable Flint UI components.
- FlintComponentNode
- Node wrapper that lets a FlintComponent render in the node tree.
- FlintComponentRegistry
- Registry that maps Flint page names to component builders.
- FlintDocument
- FlintElement
- DOM element node with a tag, properties, and children.
- FlintEvent
- Browser event helpers exposed by Flint UI.
- FlintFragment
- Groups multiple child nodes without adding an element wrapper.
- FlintMediaDevice
- A browser media input or output device.
-
FlintModelApi<
T> - Browser client for conventional FlintDart model/resource endpoints.
- FlintModelRecord
- Lightweight browser-side record that mirrors a FlintDart model payload.
- FlintNode
- Base type for all renderable Flint UI nodes.
- FlintRawHtml
- Raw HTML node used by server rendering for trusted HTML fragments.
- FlintRichText
- Browser rich text helpers for contenteditable editors.
- FlintSelectedFile
- A browser file selected from a Flint UI file input.
- FlintText
- Text node rendered into the browser DOM.
- FlintTheme
- Design theme that groups colors, spacing, radii, shadows, and fonts.
- FlintThemeController
- Reactive controller for the active Flint theme mode.
- FlintThemeProvider
- Light and dark theme pair used by RootDesign.
- FlintThemes
- Built-in Flint UI themes for quick application defaults.
- FontFamily
- CSS font-family value.
- Form
- Semantic form container with Flint UI spacing and submit handling.
- FormController
- Stateful helper for form data, validation errors, and submit lifecycle.
- FormErrors
- Collection of validation messages keyed by form field name.
- FunctionalComponent
- Component wrapper for a function that returns renderable output.
- GeoCoordinates
- Position coordinates returned by browser geolocation.
- GeoLocationController
- Server-safe geolocation controller.
- GeoLocationError
- A normalized geolocation error.
- GeoPosition
- A browser geolocation position.
- GeoWatch
- Active geolocation watch handle.
- Gradient
- CSS gradient value for typed backgrounds.
- GradientDirection
- Direction keyword for directional linear gradients.
- GradientPosition
- Position value used by radial gradients.
- Gradients
- Built-in gradients for Flint UI examples and components.
- GradientStop
- Color stop used in typed gradient factories.
- Grid
- CSS grid container with optional template and alignment controls.
- GridTemplateColumns
-
CSS
grid-template-columnsvalue with helpers for common layouts. - GridTrack
- CSS grid track value used by grid template helpers.
- Head
- Component that synchronizes page title and head metadata.
- HeadTag
-
Describes a browser
<head>tag managed by Flint UI. - HtmlContent
- Server-safe HTML content component.
- Icon
- Inline SVG icon component.
- IconButton
- Accessible icon-only button with Flint UI variants and loading state.
- IconData
- A reusable SVG icon definition for Flint UI.
- Icons
- Curated outline icons for Flint UI apps.
- IconShape
- A low-level SVG shape used by IconData.
- Image
-
Responsive
imgelement with common loading and decoding attributes. - KeyframeStep
-
One step in a CSS
@keyframesanimation. - LineChart
- A customizable SVG-based Line Chart widget for displaying trends.
- Link
- Anchor element with optional button-style variants.
- MarketingShell
- Marketing page shell with optional nav, hero, content, and footer.
- MediaDevicesController
- Server-safe media devices controller.
- MediaElementController
- Controls a Flint Video, Audio, or MediaPreview element.
- MediaPermissionError
- A normalized media permission or capture error.
- MediaPreview
- Server-safe live media preview for a MediaStreamResult.
- MediaRecorderController
- Server-safe recording controller.
- MediaRecordingOptions
- Options for browser media recording.
- MediaStreamResult
- Result returned by media capture requests.
- Modal
- Modal dialog overlay with optional header, close action, and footer actions.
- ObjectFit
- CSS object-fit value.
- Overflow
- CSS overflow value.
- PageHeader
- Page header with title, optional description, breadcrumbs, and actions.
- PageRegistry
- Registry that maps Flint page names to component builders.
- PageShell
- Full-page layout with optional navigation, header, content, and footer.
- Pagination
- Pagination controls with page summary and sibling page buttons.
- Panel
- Bordered content panel with optional section heading.
- PhotoCaptureController
- Server-safe photo capture controller.
- Popover
- Inline popover with trigger content and floating dialog content.
- PortfolioShell
- Portfolio-oriented page shell with optional nav, hero, content, and footer.
- ProgressBar
- Accessible progress indicator with tone-colored fill.
- QueryParams
- RadioGroup
- Fieldset of mutually exclusive radio options.
- RadioOption
- Option rendered inside a RadioGroup.
- Resize
- CSS resize value.
-
ResourceController<
T> - Reactive controller for loading and refreshing API data.
-
ResourceSnapshot<
T> - Immutable snapshot of an API-backed resource.
-
ResourceView<
T> - Rebuilds when a ResourceController changes.
- ResponsiveGrid
- Responsive grid that uses auto-fit columns by default.
- RichTextEditor
- A rich text WYSIWYG editor with formatting toolbar and controller support.
- RootDesign
- Global design CSS for root, document, and app-wide selectors.
- Row
- Horizontal flex container.
- SafeArea
- Container that pads content away from browser safe-area insets.
- ScrollbarDisplay
- CSS scrollbar visibility helper.
- ScrollBehavior
- CSS scroll-behavior value.
- SearchBox
- Search form with accessible input and submit handling.
- Section
- Content section with optional heading, description, and actions.
- Select
- Select field with options, placeholder, help text, and validation support.
- SelectOption
- Option rendered inside a Select field.
- Shadow
- Typed CSS box-shadow value.
- SizeValue
- CSS size value with an explicit unit.
- Skeleton
- Placeholder loading shape for content that has not loaded yet.
- Slider
- A premium, interactive carousel slider widget.
- Spacer
- Empty flex/grid spacer element.
- Spinner
- Accessible loading spinner.
- Stack
- Relative-positioned container for layered content.
- StatCard
- Metric card for dashboard statistics.
- StatefulComponent
- Base class for components that own local state or lifecycle resources.
- StatelessComponent
- Base class for components that only render constructor-provided values.
-
StateSignal<
T> - A tiny reactive value for Flint UI components.
-
StateSignalListener<
T> - Rebuilds its child whenever a StateSignal changes.
- StatusBadge
- Compact badge for status labels and optional icons.
- StyleAnimation
- Typed CSS animation shorthand value.
- StyleFilter
- Typed CSS filter value.
- StyleKeyframes
-
CSS
@keyframesanimation built from typed style steps. - StyleRule
- CSS rule with base styles and common interaction state styles.
- StyleSheet
- Named stylesheet that compiles class-based style rules to CSS text.
- StyleTransform
- Typed CSS transform value.
- StyleTransition
- Typed CSS transition value.
- Switch
- Toggle switch field with native checkbox behavior and ARIA switch semantics.
- SwitchRow
- A settings-style row with descriptive text and a trailing switch.
- TabItem
- Tab option rendered by Tabs.
- Table
- Scrollable data table with loading, empty, and selectable row states.
- TableColumn
- Column definition used by Table.
- TableRowData
- Row data rendered by Table.
- Tabs
- Tablist control for switching between keyed tabs.
- Text
- Text node and semantic text element helpers.
- TextArea
- Multiline text input with label, help text, validation, and controller support.
- TextDecorationStyle
- CSS text-decoration value.
- TextEditingController
- Mutable text value with listener notifications for controlled inputs.
- TextField
- Text input field with label, help text, validation, and controller support.
- TextOverflow
- CSS text-overflow value.
- TextTransform
- CSS text-transform value.
- ThemeProvider
-
Provides a Flint UI theme mode to a subtree through
data-theme. - ThemeToken
- Convenience factories for common theme token namespaces.
- ThemeTokens
- Collection of design token values that compile to CSS variables.
- Timeline
- Ordered timeline of events with tone-colored markers.
- TimelineItem
- Event entry rendered by Timeline.
- Toast
- Toast notification surface with optional message and action content.
- ToastService
- TokenRef
- Reference to a design token CSS variable.
- Tooltip
- Tooltip content attached to an inline child.
- Topbar
- Top navigation bar with title, leading content, actions, and user slot.
- TransitionTiming
- CSS transition timing function.
- UsageMeter
- Usage summary paired with a progress bar.
- Video
-
Native HTML
videoelement with Flint styling and media controls. - WhiteSpace
- CSS white-space value.
- WillChange
- CSS will-change value.
- WordBreak
- CSS word-break value.
- Wrap
- Flex container that wraps child items onto multiple lines.
Enums
- AlignItems
- CSS align-items values.
- BadgeVariant
- Visual variants for badges and status pills.
- Breakpoint
- Responsive breakpoint used by scoped Dart styles.
- ButtonVariant
- Visual variants for button-like actions.
- CanvasAlignment
- Alignment commands for selected canvas objects.
- CanvasGuideOrientation
- Snap guide orientation.
- CanvasPatternRepetition
- Browser canvas pattern repetition options.
- CanvasSelectionHandle
- Selection handles shown around a selected canvas object.
- CapturedMediaKind
- Type of media captured by Flint UI browser helpers.
- CardVariant
- Visual variants for card-like surfaces.
- ComponentSize
- Shared component size scale.
- CookieSameSite
- SameSite policy values for browser cookies.
- Display
- CSS display values.
- FlexDirection
- CSS flex-direction values.
- FlintThemeMode
- Built-in Flint UI theme modes.
- GeoLocationErrorCode
- Geolocation error categories normalized for Flint UI apps.
- ImageDecoding
- Browser image decoding strategy.
- ImageLoading
- Browser image loading strategy.
- InputVariant
- Visual variants for form inputs.
- JustifyContent
- CSS justify-content values.
- MediaPermissionErrorCode
- Media capture error categories normalized for Flint UI apps.
- MediaPreload
-
Browser media preload strategy for
audioandvideoelements. - MediaPreviewType
- Media element type rendered by MediaPreview.
- Visual variants for navigation items.
- Position
- CSS position values.
- ResourceStatus
- Lifecycle state for an API-backed resource.
- RichTextToolbarItem
- Semantic toolbar actions supported by the rich text editor.
- TextAlign
- CSS text-align values.
- ToastPlacement
- Tone
- Semantic tone used by shared widget theme helpers.
Constants
- authSession → const AuthSessionManager
- Shared auth session helper backed by browser local storage.
- Shared browser cookie helper.
- defaultFlintThemeStorageKey → const String
- Default local storage key used for the active Flint theme mode.
- env → const EnvironmentConfig
- flintDocument → const FlintDocument
- localStorage → const MemoryStorage
- query → const QueryParams
- sessionStorage → const MemoryStorage
-
switchDisabledStyle
→ const Map<
String, Object> - Disabled switch row treatment.
-
switchInputStyle
→ const Map<
String, Object> - Visually hides the native checkbox while keeping it interactive.
-
switchRowStyle
→ const Map<
String, Object> - Default inline row style for switch controls.
-
switchThumbOffStyle
→ const Map<
String, String> - Thumb style for disabled/off switches.
-
switchThumbOnStyle
→ const Map<
String, String> - Thumb style for enabled switches.
-
switchTrackOffStyle
→ const Map<
String, String> - Track style for disabled/off switches.
-
switchTrackOnStyle
→ const Map<
String, String> - Track style for enabled switches.
- toast → const ToastService
Properties
- clientRouter → ClientRouter
-
Shared browser API router using the current origin.
final
- currentHash → String
-
no setter
- currentPath → String
-
no setter
- currentQuery → String
-
no setter
- currentUri → Uri
-
no setter
- currentUrl → String
-
no setter
- flintTheme → FlintThemeController
-
Global theme controller used by Flint UI apps.
final
Functions
-
back(
) → void -
Creates a raw
buttonelement. -
canvasObjectFromJson(
Map< String, Object?> json) → CanvasObject - Creates a retained canvas object from JSON.
-
component(
FlintComponent component) → FlintComponentNode -
Creates a node that renders
component. -
cssValue(
Object? value, {bool unitlessNumber = false}) → String - Converts typed style values into CSS strings.
-
div(
{Map< String, Object?> props = const {}, List<Object?> children = const []}) → FlintElement -
Creates a raw
divelement. -
flintEventTarget(
Object? event) → Object? -
flintEventTargetChecked(
Object? event) → bool -
flintEventTargetValue(
Object? event) → String -
flintPreventDefault(
Object? event) → void -
flintStopPropagation(
Object? event) → void -
forward(
) → void -
fragment(
List< Object?> children) → FlintFragment -
Creates a fragment node from normalized
children. -
go(
int delta) → void -
h(
String tag, {Map< String, Object?> props = const {}, List<Object?> children = const []}) → FlintElement -
Creates a raw element node with
tag,props, and normalizedchildren. -
input(
{Map< String, Object?> props = const {}}) → FlintElement -
Creates a raw
inputelement. -
isFlintBrowserEvent(
Object? event) → bool -
joinClassNames(
Iterable< String?> values) → String - Joins non-empty CSS class names with spaces.
-
mergeComponentProps(
Map< String, Object?> props, {String? className, Map<String, Object?> defaultStyle = const {}, Map<String, Object?> variantStyle = const {}, DartStyle? dartStyle, Map<String, Object?> style = const {}}) → Map<String, Object?> - Merges component props, classes, inline styles, and scoped Dart styles.
-
mergeStyles(
Map< String, Object?> first, Map<String, Object?> second, [Map<String, Object?> third = const {}, Map<String, Object?> fourth = const {}, Map<String, Object?> fifth = const {}]) → Map<String, Object?> - Combines style maps from left to right, ignoring null values.
-
normalizeChildren(
Object? child, List< Object?> children) → List<FlintNode> - Normalizes a single child and additional children into Flint nodes.
-
reload(
) → void -
replace(
String url, {Object? state}) → void -
resolveFieldError(
{required String? name, String? error, FormErrors? errors}) → String? -
Resolves an explicit field error before falling back to
errors. -
rootStyleToCss(
Map< String, Object?> style) → String - Converts a style map into root-level CSS declarations.
-
span(
{Map< String, Object?> props = const {}, List<Object?> children = const []}) → FlintElement -
Creates a raw
spanelement. -
styleToCss(
Map< String, Object?> style) → String - Converts a style map into a CSS declaration string.
-
text(
Object? value) → FlintText -
Creates a text node from
value. -
toFlintNode(
Object? value) → FlintNode - Converts common values into a renderable Flint node.
-
token(
String name, {Object? fallback}) → TokenRef - Creates a reference to a design token.
-
useForm(
Map< String, Object?> initialValues) → FormController -
Creates a FormController initialized with
initialValues.
Typedefs
- CanvasChangeCallback = void Function(CanvasController controller)
- Called when retained canvas objects change.
- CanvasHistoryCallback = void Function(CanvasController controller)
- Called after undo or redo changes the scene.
-
CanvasObjectsCallback
= void Function(List<
CanvasObject> objects) - Called after selected canvas objects move, resize, or rotate.
- CanvasPointerCallback = void Function(CanvasPointerEvent event)
- Called for pointer-level canvas events.
-
CanvasSelectCallback
= void Function(List<
CanvasObject> objects) - Called when canvas selection changes.
- CanvasTextEditCallback = String? Function(CanvasTextObject text)
- Called when browser text editing starts for a text object.
- Component = StatefulComponent
- Backwards-compatible alias for StatefulComponent.
- FlintBrowserEvent = Object
-
FlintPageBuilder
= FlintComponent Function(Map<
String, dynamic> props) - Builds a page component from server-provided props.
- FlintStateUpdater = void Function()
- Callback used to mutate component state before a rerender is scheduled.
- FlintVoidCallback = void Function()
- Listener signature used by form and text editing controllers.
-
JsonModelFactory<
T> = T Function(Map< String, dynamic> json) - Builds a typed object from a JSON map returned by a FlintDart API.
- LocalStorage = MemoryStorage
- Node = FlintNode
- Short public alias for FlintNode in app code and examples.
-
ResourceBuilder<
T> = View? Function(ResourceSnapshot< T> snapshot) - Builds UI from the current resource snapshot.
-
ResourceLoader<
T> = Future< T> Function() - Loads data for a ResourceController.
- SessionStorage = MemoryStorage
-
StateSignalBuilder<
T> = View? Function(T value) - Builds UI from a StateSignal value.
-
StateSignalCallback<
T> = void Function(T value) - Called when a StateSignal changes.
- StateSignalSubscription = void Function()
- Cancels a StateSignal.listen subscription.
- View = Object?
- Return type for component build methods.