flint_ui_server library
Server-side Flint UI APIs.
Import this from Flint server code that needs to render components to an HTML string without mounting browser DOM behavior.
Classes
- AnimationDirection
- CSS animation-direction value.
- AnimationFillMode
- CSS animation-fill-mode value.
- AnimationIteration
- CSS animation-iteration-count value.
- AnimationPlayState
- CSS animation-play-state value.
- Background
- CSS background value that can combine multiple layers.
- Border
- Typed CSS border shorthand value.
- BoxSizing
- CSS box-sizing value.
- Color
- CSS color value used by typed Flint UI styles.
- Colors
- Built-in color tokens for Flint UI examples and components.
- Cursor
- CSS cursor value.
- DartStyle
- Typed CSS style object for Flint UI components.
- EdgeInsets
- Typed spacing value for CSS margin and padding.
- 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.
- FlintElement
- DOM element node with a tag, properties, and children.
- FlintFragment
- Groups multiple child nodes without adding an element wrapper.
- FlintNode
- Base type for all renderable Flint UI nodes.
- FlintRawHtml
- Raw HTML node used by server rendering for trusted HTML fragments.
- FlintServerRenderer
- Renders Flint UI nodes and components to an HTML string on the server.
- FlintText
- Text node rendered into the browser DOM.
- FlintTheme
- Design theme that groups colors, spacing, radii, shadows, and fonts.
- FontFamily
- CSS font-family value.
- FunctionalComponent
- Component wrapper for a function that returns renderable output.
- 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.
- GridTemplateColumns
-
CSS
grid-template-columnsvalue with helpers for common layouts. - GridTrack
- CSS grid track value used by grid template helpers.
- KeyframeStep
-
One step in a CSS
@keyframesanimation. - ObjectFit
- CSS object-fit value.
- Overflow
- CSS overflow value.
- PageRegistry
- Registry that maps Flint page names to component builders.
- Resize
- CSS resize value.
- RootDesign
- Global design CSS for root, document, and app-wide selectors.
- ScrollBehavior
- CSS scroll-behavior value.
- Shadow
- Typed CSS box-shadow value.
- SizeValue
- CSS size value with an explicit unit.
- StatefulComponent
- Base class for components that own local state or lifecycle resources.
- StatelessComponent
- Base class for components that only render constructor-provided values.
- 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.
- TextDecorationStyle
- CSS text-decoration value.
- TextTransform
- CSS text-transform value.
- ThemeToken
- Convenience factories for common theme token namespaces.
- ThemeTokens
- Collection of design token values that compile to CSS variables.
- TokenRef
- Reference to a design token CSS variable.
- TransitionTiming
- CSS transition timing function.
- WillChange
- CSS will-change value.
Enums
- AlignItems
- CSS align-items values.
- Breakpoint
- Responsive breakpoint used by scoped Dart styles.
- Display
- CSS display values.
- FlexDirection
- CSS flex-direction values.
- JustifyContent
- CSS justify-content values.
- Position
- CSS position values.
- TextAlign
- CSS text-align values.
Functions
-
Creates a raw
buttonelement. -
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. -
fragment(
List< Object?> children) → FlintFragment -
Creates a fragment node from normalized
children. -
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. -
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.
-
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.
Typedefs
- Component = StatefulComponent
- Backwards-compatible alias for StatefulComponent.
-
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.
- Node = FlintNode
- Short public alias for FlintNode in app code and examples.
- View = Object?
- Return type for component build methods.