bloom_mobile library

Fabric-grade Native Mobile AST Engine for Bloom JS Native descriptors.

Re-exports pure Dart AST nodes from package:bloom_js_native alongside high-performance Flutter layout render boxes, virtualized list engines, style resolvers, and the root BloomMobileApp widget.

Example:

import 'package:bloom_framework/bloom_mobile.dart';

void main() {
  runApp(
    BloomMobileApp(
      descriptor: Div(children: [H1(text: 'Native Mobile Screen')]),
    ),
  );
}

Classes

A
<a> — anchor / hyperlink element.
Abbr
<abbr> — abbreviation or acronym.
AcceptLanguageEntry
A parsed entry from an HTTP Accept-Language header or browser preferences with quality weighting.
Animated
DSL widget that wraps child with the CSS keyframe animation described by animation.
AnimatedNode
AST node that wraps child with a CSS animation described by animation.
AriaLiveRegion
A standalone single live region descriptor bound to a specific message signal.
Article
<article> — self-contained, independently distributable composition.
Aside
<aside> — sidebar or tangentially related content container.
Blockquote
<blockquote> — section quoted from another source.
BloomAnimation
Immutable CSS animation descriptor defining @keyframes rules and timing properties.
BloomAnimationPresets
Ready-to-use BloomAnimation presets for common UI transitions.
BloomAnnouncer
Pure-Dart reactive state controller for broadcasting live screen-reader announcements.
BloomCatalog
A localized message catalog storing translated templates for a single BCP-47 locale.
BloomComputedStyle
Resolved computed CSS layout, sizing, typography, and visual styling rules.
BloomContainer
Lightweight, hierarchical Dependency Injection (DI) container for Bloom JS Native applications.
BloomContext<T>
Token representing an ambient context value of type T.
BloomController
Base class for stateful controllers and view-models in Bloom JS Native applications.
BloomData
Global query cache manager and request deduplicator for Bloom JS Native applications.
BloomDevToolsEvent
A recorded diagnostic event emitted by BloomJsDevTools.notify.
BloomEnv
Environment configuration store, parser, and type-safe reader for Bloom JS Native applications.
BloomEnvironmentSchema
Abstract base class for defining strictly typed and validated environment variable schemas.
BloomEvent
Typed DOM event abstraction that decouples event handlers from the browser runtime.
BloomFeatureFlags
Dynamic, signal-backed feature flags engine for runtime gating and progressive rollout.
BloomFieldArray<T extends BloomFormControl>
Reactive controller for a repeating collection of child form controls or sub-forms.
BloomFile
Platform-neutral file descriptor for file inputs and attachments.
BloomFileField
Reactive controller for <input type="file"> file selection fields.
BloomFireEvent
Synthetic event dispatcher for simulating DOM events in headless VM unit tests.
BloomFlexLayout
MultiChildRenderObjectWidget implementing standard CSS Flexbox for native mobile.
BloomFlexParentData
Parent data used by RenderBloomFlex to store flex layout properties per child.
BloomForm
Reactive controller for a collection of named form controls.
BloomFormControl
Abstract base contract for all reactive Bloom form controls.
BloomFormField
Reactive state controller for an individual string form input field.
BloomFormGroup
Reactive controller for a nested group of named form controls.
BloomHttpClient
High-level HTTP client with base URL resolution, JSON encoding/decoding, Bearer auth token injection, request/response interceptors, and timeout handling.
BloomI18n
Reactive internationalization controller and multi-catalog store for Bloom applications.
BloomImage
An optimized, responsive <img> element descriptor.
BloomInfiniteQuery<TPage, TParam>
A reactive asynchronous paginated/infinite query coordinator with caching, cursor/offset pagination, background revalidation, and invalidation tracking.
BloomIsland
Emits a server-rendered island placeholder element configured with the given hydration strategy and props.
BloomJsDevTools
Runtime diagnostics and inspection interface for development-time tooling.
BloomKeyframe
A single keyframe stop in a CSS animation at a normalized offset (0.0 to 1.0).
BloomLazyComponent
Caches an asynchronous component loader, ensuring the loader executes at most once across renders.
BloomLeafTextWidget
High-performance LeafRenderObjectWidget that binds directly to a signal-backed text evaluation function.
BloomMobileApp
Top-level mobile application wrapper that mounts a Bloom JS Native AST tree into a native mobile app.
BloomMutation<T, P>
Asynchronous mutation manager with automated optimistic updates, automatic rollback, and cache invalidation.
BloomNativeInputHost
Persistent native input controller host that manages software keyboard focus and cursor stability.
BloomNativeRenderer
Fabric-grade Native AST Renderer translating pure Dart BloomNode descriptors into Flutter widgets and render boxes.
BloomNode
The core descriptor tree root — pure Dart, zero DOM dependency.
BloomPicture
<picture> element descriptor subclassing ElNode.
BloomQuery<T>
A reactive asynchronous query manager with automatic caching, request deduplication, background revalidation, and invalidation listening.
BloomRealtimeBinding
Reactive signal-backed adapter wrapping a BloomRealtimeChannelClient.
BloomRealtimeChannelClient
Minimal realtime client contract that BloomRealtimeBinding wraps.
BloomReducer<S, A>
A signal-backed state container managing complex state transitions via a pure reducer function.
BloomRoute
Route definition that pairs a URL path pattern with view builders, loaders, and guards.
BloomRouteGuard
Abstract contract for route navigation guards.
BloomRouteMatch
Result of a successful route match containing the matched route and extracted parameters.
BloomRouter
Pure Dart route matching and navigation guard evaluation engine.
BloomRpcBinding<TInput, TOutput>
Associates a BloomRpcContract with its server-side BloomRpcHandler implementation.
BloomRpcCancelToken
Cancellation token used to abort in-flight RPC requests.
BloomRpcClient
High-level typed RPC client that executes BloomRpcContract endpoints over HTTP.
BloomRpcContract<TInput, TOutput>
Strongly-typed specification of an RPC network endpoint.
BloomRpcRouter
Server-side RPC router and registry mapping BloomRpcContract endpoints to BloomRpcHandler callbacks.
BloomRpcServerContext
Request execution context passed to server-side BloomRpcHandler implementations.
BloomRpcServerRequest
Pure-Dart abstraction representing an incoming HTTP server request for RPC routing.
BloomRpcServerResponse
Pure-Dart abstraction representing an outgoing HTTP server response for RPC routing.
BloomRpcValidationErrors
Structured field-level and general validation errors from an RPC error response.
BloomScheduler
Cooperative priority-based time-slicing scheduler for Bloom JS Native.
BloomStyleResolver
High-performance CSS and utility class style resolver for native rendering.
BloomTestRenderer
Test harness wrapping a BloomNode AST tree for querying and assertion in VM tests.
BloomTypedFormField<T>
Reactive state controller for an individual strongly-typed form input field.
BloomVirtualList<T>
Virtualized recycling list for ForEachNode collections on mobile devices.
Br
<br> — line break (void element).
Button
<button> — interactive clickable button element.
Canvas
<canvas> — 2D and WebGL bitmap graphics surface.
Caption
<caption> — title or accessibility description for a parent <table>.
Cite
<cite> — title of a creative work or citation reference.
Code
<code> — inline code fragment or computer code snippet.
CommandItemConfig
Descriptor for a single command item in the command palette.
CommandPaletteConfig
Configuration descriptor for an active command palette overlay.
Computed<T>
Data is often derived from other pieces of existing data. The computed function lets you combine the values of multiple signals into a new signal that can be reacted to, or even used by additional computeds. When the signals accessed from within a computed callback change, the computed callback is re-executed and its new return value becomes the computed signal's value.
ContextProviderNode<T>
AST node that injects context value into its descendant child tree.
DefaultSchedulerHost
Default pure-Dart implementation of SchedulerHost using Timer macrotasks.
Details
<details> — interactive disclosure widget.
Dialog
<dialog> — interactive modal or non-modal dialog window.
DialogConfig
Configuration descriptor for a global dialog overlay.
Div
<div> — generic division / block layout container.
Effect
The effect function is the last piece that makes everything reactive. When you access a signal inside its callback function, that signal and every dependency of said signal will be activated and subscribed to. In that regard it is very similar to computed(fn). By default all updates are lazy, so nothing will update until you access a signal inside effect.
El
Generic HTML / custom element constructor.
ElNode
HTML element descriptor.
Em
<em> — text with emphatic stress.
ErrorBoundary
DSL sugar for ErrorBoundaryNode.
ErrorBoundaryNode
Catches exceptions during subtree rendering or reactive rebuilds and renders fallback instead of crashing.
Figcaption
<figcaption> — caption or legend for a parent <figure>.
Figure
<figure> — self-contained figure content (images, charts, code blocks).
<footer> — footer container for a page or section.
ForEach<T>
Reactive list rendering sugar.
ForEachNode<T>
List rendering primitive. Re-reads items reactively; each item is mapped through builder to a descriptor.
Form
<form> — interactive form submission container.
Fragment
Fragment grouping sugar.
FragmentNode
Fragment — groups multiple child nodes without introducing a wrapper DOM element.
GuardResolution
Outcome of BloomRouter.resolveRedirects after following guard redirects.
GuardResult
Represents the result of evaluating a route navigation guard.
H1
<h1> — highest-level section heading element.
H2
<h2> — second-level section heading element.
H3
<h3> — third-level section heading element.
H4
<h4> — fourth-level section heading element.
H5
<h5> — fifth-level section heading element.
H6
<h6> — sixth-level section heading element.
<header> — introductory or navigational container for a page or section.
Hr
<hr> — thematic break / horizontal rule (void element).
IFrame
<iframe> — inline frame embedding an external browsing context.
Img
<img> — embedded image element.
InMemoryLocaleStorage
In-memory implementation of LocaleStorage suitable for testing and SSR.
Input
<input> — interactive form input control element.
KbdEl
<kbd> — keyboard input or key combination.
Label
<label> — caption for a form control element.
Li
<li> — list item element.
Hyperlink element (<a>) with built-in client-side routing and prefetch capabilities.
Live
Reactive text / subtree — the JSX {expr} equivalent.
LiveNode
Reactive boundary — re-evaluates builder inside a signal effect and patches only its own DOM region.
LiveRegion
Declarative live region descriptor that exposes announcements to assistive technologies.
LocaleStorage
Contract for persisting user locale selection across browser sessions.
Main
<main> — dominant central content container of a document.
Mark
<mark> — text highlighted for reference or relevance purposes.
Memo<T>
Memoization sugar.
MemoNode<T>
Memoization boundary — only re-evaluates builder when dependency produces a value that differs (!=) from its previous value.
Configuration for a dropdown menu item.
Mount
DSL sugar for MountNode.
MountNode
Lifecycle boundary node that triggers callbacks on mount and unmount.
<nav> — section of navigation links.
Configuration descriptor for a navigation menu item.
NpmDependency
Declaration of an npm package dependency resolved via browser ESM import maps.
NpmRegistry
In-memory registry collecting NpmDependency declarations and generating ESM import maps.
Ol
<ol> — ordered list element.
Optgroup
<optgroup> — group of related <option> items within a <select> control.
Option
<option> — selectable item in a <select> control.
P
<p> — paragraph block element.
PictureSource
Specification for a single <source> element within a <picture> container.
Portal
DSL sugar for PortalNode.
PortalNode
Renders child into a target DOM node outside the parent hierarchy while maintaining parent reactive region lifecycle.
Pre
<pre> — preformatted text block preserving whitespace and formatting.
QueryCacheEntry<T>
A cached record containing fetched data, timestamps, and TTL settings.
Raw
Trusted raw HTML passthrough sugar.
RawHtmlNode
Trusted raw HTML passthrough — rendered verbatim by both backends.
ReadonlySignal<T>
Read only signals can just retrieve a value but not update or cause mutations
RealtimeMessage
Wire message envelope for Bloom Realtime channel, broadcast, and presence communication.
Ref<T extends Object>
Reference holder for imperative access to mounted DOM elements.
RefNode
Attaches a Ref to the first web.Element created by child.
RenderBloomFlex
Custom RenderBox executing CSS flexbox layout calculations for native rendering.
RenderBloomLeafText
Custom leaf RenderBox that directly paints text using TextPainter with fine-grained signal subscriptions.
ResolvedLocale
Immutable wrapper carrying a resolved BCP-47 language tag.
SchedulerHost
Platform host interface providing cooperative macrotask yielding and scheduling.
SchedulerTask<T>
Represents a unit of work scheduled in the BloomScheduler queue.
ScopedCss
A compiled scoped CSS stylesheet bundle providing deterministic class name isolation.
Section
<section> — standalone generic thematic section of a document.
Select
<select> — control that provides a menu of options.
SheetConfig
Configuration descriptor for slide-over side panels and drawers.
Show
Conditional rendering sugar.
ShowNode
Conditional rendering primitive.
Signal<T>
AsyncState is class commonly used with Future/Stream signals to represent the states the signal can be in.
Small
<small> — side-comments, small print, and legal disclaimers.
Span
<span> — generic inline phrasing content container.
Strong
<strong> — content of strong importance, seriousness, or urgency.
Style
Inline stylesheet sugar.
StyleNode
Style element helper — emits <style>css</style>.
Sub
<sub> — subscript text.
Summary
<summary> — disclosure summary or caption heading for a parent <details>.
Sup
<sup> — superscript text.
Suspense<T>
DSL sugar for SuspenseNode.
SuspenseNode<T>
Declarative async boundary that renders fallback while resource resolves.
Svg
<svg> — root SVG graphics viewport container element.
SvgCircle
<circle> — SVG circle shape element.
SvgG
<g> — SVG grouping container element.
SvgLine
<line> — SVG straight line element.
SvgNode
SVG element node base class.
SvgPath
<path> — SVG vector shape path element.
SvgRect
<rect> — SVG rectangle shape element.
SvgText
<text> — SVG graphical text element.
SvgUse
<use> — SVG element instance reuse element.
SyncSchedulerHost
Synchronous scheduler host that immediately runs scheduled tasks without time-slicing.
Table
<table> — tabular data container element.
Tbody
<tbody> — group of body data rows in a <table>.
Td
<td> — standard data cell in a <table>.
Text
Plain text node sugar.
Textarea
<textarea> — multi-line plain text editing control element.
TextNode
Plain text leaf descriptor.
Tfoot
<tfoot> — group of summary footer rows in a <table>.
Th
<th> — header cell in a <table>.
Thead
<thead> — group of header rows in a <table>.
TimeEl
<time> — machine-readable date/time representation.
ToastItem
Descriptor representing an active toast notification item.
Tr
<tr> — row of cells in a <table>.
Ul
<ul> — unordered list element.
VisuallyHidden
Renders a <span> element visually hidden from sighted users but fully accessible to screen readers and assistive technologies.
VisuallyHiddenStyle
Style descriptor for embedding screen-reader utility CSS rules.

Enums

AlertVariant
AriaAutocomplete
Allowed values for aria-autocomplete.
AriaChecked
Allowed values for aria-checked.
AriaCurrent
Allowed values for aria-current.
AriaHasPopup
Allowed values for aria-haspopup.
AriaInvalid
Allowed values for aria-invalid.
AriaLive
Allowed values for aria-live.
AriaOrientation
Allowed values for aria-orientation.
AriaPressed
Allowed values for aria-pressed.
AriaRelevant
Allowed values for aria-relevant.
AriaRole
WAI-ARIA landmark, widget, and structure roles.
AriaSort
Allowed values for aria-sort.
AvatarSize
BadgeVariant
BloomFlexWrap
CSS flex wrap behavior modes supported by the native engine.
BloomHttpMethod
HTTP request method enum for BloomRpcContract definitions.
BloomTextDirection
Text direction representation for bidirectional script layout.
ButtonSize
ButtonVariant
DateFormatStyle
Formatting styles for localized date presentations.
FetchPriority
Priority hints for browser resource scheduling via the fetchpriority attribute.
HydrationStrategy
Hydration trigger strategies for Bloom islands.
ImageDecoding
Image decoding hints guiding the browser's rendering engine.
ImageFit
CSS object-fit sizing behaviors for responsive image scaling.
ImageLoading
Loading strategies determining when the browser initiates image network fetching.
MutationStatus
Lifecycle execution status of a BloomMutation.
PrefetchMode
Speculative prefetching strategies for Link navigation targets.
QueryStatus
Execution status lifecycle of a BloomQuery.
RealtimeConnectionState
Connection states for a BloomRealtimeChannelClient.
TaskPriority
Priority levels for tasks scheduled with BloomScheduler.
ToastVariant
ToggleSize
Size options for toggle buttons.
ToggleVariant
Visual style variant for toggle buttons.

Extensions

BloomAriaAttributesExtension on Map<String, String>?
Extension on Map<String, String> to ergonomically chain and merge ARIA attributes.
BloomDateTimeClientI18n on DateTime
Convenience internationalization extension on DateTime for localized formatting.

Constants

bloomHydratedAttribute → const String
DOM attribute name added to an island placeholder element once hydration is complete.
bloomIslandAttribute → const String
DOM attribute name used to identify an island placeholder and specify its registered name.
bloomMediaAttribute → const String
DOM attribute name specifying the CSS media query string for HydrationStrategy.media.
bloomPropsAttribute → const String
DOM attribute name containing JSON-encoded props passed to the island's BloomIslandBuilder.
bloomRootMarginAttribute → const String
DOM attribute name specifying the rootMargin CSS string for the HydrationStrategy.visible observer.
bloomStrategyAttribute → const String
DOM attribute name specifying the HydrationStrategy for an island placeholder.
fireEvent → const BloomFireEvent
Global synthetic event dispatcher for headless VM unit tests.
srOnlyClass → const String
Standard alias CSS class name for screen-reader elements (sr-only).
uiTokensCss → const String
Bloom UI Design Tokens.
visuallyHiddenClass → const String
Standard CSS class name for visually-hidden screen-reader elements.
visuallyHiddenCss → const String
Complete CSS stylesheet rules for bloom-sr-only and sr-only classes.
visuallyHiddenStyle → const String
Standard inline CSS rule implementing the clip-rect technique.

Properties

activeCommandPalette Signal<CommandPaletteConfig?>
Global active command palette state signal.
final
activeDialog Signal<DialogConfig?>
Global active dialog state signal.
final
activeSheet Signal<SheetConfig?>
Global active sheet / drawer state signal.
final
currentLocaleSignal Signal<String>
Returns the global reactive locale signal from BloomI18n.instance.
no setter
globalContainer BloomContainer
Returns the ambient global BloomContainer instance.
no setter
isTransitionPending ReadonlySignal<bool>
Reactive read-only signal indicating whether a non-urgent transition update is pending.
no setter
toastList Signal<List<ToastItem>>
Global reactive signal list of active toast items.
final

Functions

accordion({required List<AccordionItem> items, bool allowMultiple = false, Set<String>? initialOpen, String extraClassName = ''}) BloomNode
Accordion component primitive with local reactive state and smooth toggle animations.
alert({required String title, String? description, AlertVariant variant = AlertVariant.info, String? icon, BloomNode? action, String extraClassName = ''}) BloomNode
Static inline alert banner primitive.
allowedExtensions(List<String> extensions, [String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when a file's extension is not in extensions.
allowedMimeTypes(List<String> mimeTypes, [String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when a file's MIME type does not match mimeTypes.
aria({AriaRole? role, String? label, String? labelledBy, String? labelledby, String? describedBy, String? describedby, String? details, String? errorMessage, String? errormessage, String? flowTo, String? flowto, String? controls, String? owns, bool? hidden, bool? expanded, bool? selected, bool? checked, AriaChecked? checkedState, bool? pressed, AriaPressed? pressedState, bool? disabled, bool? required, bool? readOnly, bool? readonly, bool? modal, bool? multiselectable, bool? multiLine, bool? multiline, bool? busy, bool? atomic, bool? invalid, AriaInvalid? invalidState, AriaLive? live, AriaCurrent? current, AriaHasPopup? hasPopup, AriaHasPopup? haspopup, AriaOrientation? orientation, AriaAutocomplete? autocomplete, AriaSort? sort, AriaRelevant? relevant, int? level, int? setSize, int? setsize, int? posInSet, int? posinset, int? colIndex, int? rowIndex, int? colSpan, int? rowSpan, num? valueMin, num? valuemin, num? valueMax, num? valuemax, num? valueNow, num? valuenow, String? valueText, String? valuetext, String? keyShortcuts, String? keyshortcuts, String? placeholder, String? roleDescription, String? roledescription, Map<String, String>? extra}) Map<String, String>
Generates a map of WAI-ARIA and accessibility attributes.
ariaAttr(String name, String value) Map<String, String>
Helper for constructing a single ARIA attribute map entry.
aspectRatio({required double ratio, required BloomNode child, String extraClassName = ''}) BloomNode
Aspect ratio container component primitive.
avatar({String? src, String? alt, String? fallbackText, AvatarSize size = AvatarSize.md, String extraClassName = '', BloomNode? badge, Map<String, String> attrs = const {}}) BloomNode
Avatar primitive with image and fallback initials.
avatarGroup({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Avatar group container overlapping multiple avatars.
badge({required String label, BadgeVariant variant = BadgeVariant.defaultVariant, void onDismiss()?, String? icon, String extraClassName = ''}) BloomNode
Generic badge primitive for Bloom UI.
barChart({required List<ChartDataPoint> data, double? maxValue, double height = 160, String? color, String extraClassName = ''}) BloomNode
Simple pure-SVG bar chart component.
batch<T>(BatchCallback<T> fn) → T
The batch function allows you to combine multiple signal writes into one single update that is triggered at the end when the callback completes.
bloomImage({required String src, String? alt, bool decorative = false, int? width, int? height, String? aspectRatio, List<int>? widths, String? sizes, ImageUrlBuilder? urlBuilder, ImageLoading loading = ImageLoading.lazy, ImageDecoding decoding = ImageDecoding.async, FetchPriority? fetchPriority, bool priority = false, String? placeholder, String? fallbackSrc, ImageFit? fit, String? className, String? style, Map<String, String>? attrs, BloomEventHandler? onClick, BloomEventHandler? onLoad, BloomEventHandler? onError, Ref<Object>? ref}) BloomNode
High-performance responsive image descriptor helper for Bloom JS Native.
bloomIsland({required String name, BloomNode? child, List<BloomNode>? children, HydrationStrategy strategy = HydrationStrategy.immediate, Map<String, dynamic>? props, String? rootMargin, String? media, String tag = 'div', String? className, String? style, Map<String, String>? attrs}) BloomIsland
Helper function to construct a BloomIsland placeholder descriptor.
bloomPicture({required List<PictureSource> sources, required String fallbackSrc, String? alt, bool decorative = false, int? width, int? height, String? aspectRatio, List<int>? fallbackWidths, String? sizes, ImageUrlBuilder? urlBuilder, ImageLoading loading = ImageLoading.lazy, ImageDecoding decoding = ImageDecoding.async, FetchPriority? fetchPriority, bool priority = false, String? placeholder, String? fallbackOnErrorSrc, ImageFit? fit, String? className, String? style, Map<String, String>? attrs, BloomEventHandler? onClick, BloomEventHandler? onLoad, BloomEventHandler? onError, Ref<Object>? ref}) BloomNode
Art-directed, multi-format <picture> element descriptor helper.
Breadcrumb navigation hierarchy primitive.
buildQueryString(Map<String, dynamic> query) String
Serializes a map of query parameters into a URL query string prefixed with ?.
buildSrcSet(String src, List<int> widths, {ImageUrlBuilder? urlBuilder}) String
Builds a standard HTML5 srcset attribute string from a base src and a list of target widths.
button({required String text, BloomEventHandler? onClick, String? href, ButtonVariant variant = ButtonVariant.primary, ButtonSize size = ButtonSize.md, bool disabled = false, String? icon, bool loading = false, String extraClassName = '', Map<String, String> attrs = const {}, List<BloomNode>? children}) BloomNode
Generic Button primitive for Bloom UI.
buttonClasses({ButtonVariant variant = ButtonVariant.primary, ButtonSize size = ButtonSize.md, String extraClassName = ''}) String
Resolves CSS classes for ButtonVariant and ButtonSize.
calendar({required DateTime month, DateTime? selected, required void onSelect(DateTime date), required void onMonthChange(DateTime date), String extraClassName = ''}) BloomNode
Controlled month-grid date picker component.
card({required List<BloomNode> children, String extraClassName = '', Map<String, String> attrs = const {}}) BloomNode
Card container primitive.
cardContent({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Main body content section of a card.
cardDescription({required String text, String extraClassName = ''}) BloomNode
Secondary description element inside cardHeader.
cardFooter({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Footer action section of a card.
cardHeader({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Header section of a card.
cardTitle({required String text, String extraClassName = ''}) BloomNode
Title element inside cardHeader.
checkbox({required String id, String? name, bool checked = false, bool indeterminate = false, bool disabled = false, String? label, BloomNode? labelNode, BloomEventHandler? onChange, void onCheckedChange(bool)?, String extraClassName = '', Map<String, String> attrs = const {}}) BloomNode
Checkbox primitive with label and indeterminate state support.
circularProgress({required double value, double max = 100, double size = 40, double strokeWidth = 3.5, String? color, String? label, bool showValue = false, String extraClassName = ''}) BloomNode
Circular determinate progress indicator primitive.
closeCommandPalette() → void
Closes the currently active command palette.
closeDialog() → void
Closes the currently active dialog.
closeDrawer() → void
Closes the currently active drawer.
closeSheet() → void
Closes the currently active sheet / drawer.
cn(List<Object?> classes) String
Plain Dart class name concatenation helper for Bloom UI primitives.
commandViewport() BloomNode
Root viewport component for rendering the global command palette modal overlay.
computed<T>(ComputedCallback<T> compute, {String? debugLabel, bool autoDispose = false}) Computed<T>
Data is often derived from other pieces of existing data. The computed function lets you combine the values of multiple signals into a new signal that can be reacted to, or even used by additional computeds. When the signals accessed from within a computed callback change, the computed callback is re-executed and its new return value becomes the computed signal's value.
contextMenu({required BloomNode child, required List<MenuItemConfig> items, String extraClassName = ''}) BloomNode
Context menu descriptor triggered by right-click.
createContext<T>(T defaultValue) BloomContext<T>
Creates a typed ambient BloomContext with defaultValue.
cx(List<Object?> parts) String
Conditional className builder — clsx-style utility.
defaultImageUrlBuilder(String src, int width) String
Default image URL builder appending target width as a query parameter.
dialogViewport() BloomNode
Root viewport component for rendering the active modal dialog.
dirAttribute([String? locale]) Map<String, String>
Generates a { 'dir': 'rtl' } or { 'dir': 'ltr' } attribute map for locale.
dismissToast(String id) → void
Dismisses a toast by its id.
drawerViewport() BloomNode
Viewport component for rendering active drawer/sheet modals.
Dropdown actions menu with local reactive state and backdrop click-to-close.
effect(EffectCallback compute, {String? debugLabel, EffectCallback? onDispose}) → EffectCleanup
The effect function is the last piece that makes everything reactive. When you access a signal inside its callback function, that signal and every dependency of said signal will be activated and subscribed to. In that regard it is very similar to computed(fn). By default all updates are lazy, so nothing will update until you access a signal inside effect.
email([String? message]) String? Function(String)
Creates a validator that fails when a string value is not a valid email address.
escapeHtml(String input) String
Escapes special HTML characters in text content and attribute values to prevent XSS.
fieldGroup({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Field group container for stacking or arranging multiple fields.
fieldSet({required List<BloomNode> children, String? legend, String extraClassName = ''}) BloomNode
Fieldset container grouping related form fields.
fileRequired([String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when no file is selected.
firstLocaleTag(String? header) String?
Parses the first valid BCP-47 language tag from an Accept-Language header string.
fnv1a32(String input) int
Computes a deterministic 32-bit FNV-1a hash over input.
Returns a <link rel="stylesheet" href="..."> BloomNode referencing the self-hosted font stylesheet generated by bloom fonts optimize.
formatCurrency(num value, {String currency = 'USD', String? locale, int? decimalDigits}) String
Formats a currency amount with currency code or symbol and locale positioning in pure Dart.
formatDate(DateTime date, {String? locale, String? pattern, DateFormatStyle? style}) String
Formats a DateTime date according to locale conventions in pure Dart.
formatDateTime(DateTime dateTime, {String? locale, String? pattern, DateFormatStyle? style}) String
Formats a DateTime date and time according to locale conventions in pure Dart.
formatNumber(num value, {String? locale, int? decimalDigits, bool useGrouping = true, String style = 'decimal'}) String
Formats a num value with locale-aware grouping and decimal separators in pure Dart.
formatPercent(num value, {String? locale, int? decimalDigits = 0}) String
Formats a percentage value for locale in pure Dart.
formatRelativeTime(DateTime date, {DateTime? relativeTo, String? locale, bool numeric = false}) String
Formats relative time intervals (e.g. "just now", "5 minutes ago", "in 2 hours", "yesterday") in pure Dart.
formField({required String label, required BloomNode control, String? id, String? error, String? help, bool required = false, String extraClassName = ''}) BloomNode
Form field layout wrapper with label, control, and optional help or error text.
getTextDirection([String? locale]) BloomTextDirection
Resolves the BloomTextDirection for the specified locale.
hoverCard({required BloomNode trigger, required BloomNode content, String side = 'bottom', String align = 'center', String extraClassName = ''}) BloomNode
Pure CSS hover card preview component.
iconSvgString(String name, {String className = 'w-4 h-4'}) String
Renders an inline SVG icon for Bloom UI primitives.
infiniteQuery<TPage, TParam>({required List key, required Future<TPage> fetch(TParam pageParam), required TParam initialPageParam, required TParam? getNextPageParam(TPage lastPage, List<TPage> allPages), Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool enabled = true, List getItems(TPage page)?, List<TPage>? initialData}) BloomInfiniteQuery<TPage, TParam>
Creates a reactive BloomInfiniteQuery configured with pagination parameters.
inject<T>() → T
Resolves a dependency of type T from the globalContainer.
injectOrNull<T>() → T?
Resolves a dependency of type T from the globalContainer, or returns null if unregistered.
inputGroup({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Layout container for grouping an input control with leading/trailing addons.
inputGroupAddon({required List<BloomNode> children, String align = 'left', String extraClassName = ''}) BloomNode
Addon container placed inside an inputGroup.
inputGroupText({required String text, String extraClassName = ''}) BloomNode
Text label helper for inputGroupAddon.
inputOtp({required int length, required String value, required void onChange(String value), bool disabled = false, bool hasError = false, String extraClassName = ''}) BloomNode
Controlled one-time password (OTP) / PIN input primitive.
isRtl([String? locale]) bool
Returns true if locale represents a right-to-left (RTL) script.
label({String? text, String? htmlFor, bool required = false, String extraClassName = '', List<BloomNode>? children, Map<String, String> attrs = const {}}) BloomNode
Form label primitive for Bloom UI.
lazy(Future<BloomNode> loader(), {required BloomNode fallback}) BloomNode
Creates a lazily loaded BloomNode descriptor that displays fallback until loader resolves.
loadLocale(String locale) Future<bool>
Asynchronously loads a catalog bundle for locale via BloomI18n.instance.
localizedCurrency(num value, [String currency = 'USD', String? locale]) String
Formats a localized currency string for the active locale on BloomI18n.instance.
localizedDate(DateTime date, [String? locale, String? pattern]) String
Formats a localized date for the active locale on BloomI18n.instance.
localizedDateTime(DateTime dateTime, [String? locale, String? pattern]) String
Formats a localized date and time for the active locale on BloomI18n.instance.
localizedNumber(num value, [String? locale, int? decimalDigits]) String
Formats a localized number for the active locale on BloomI18n.instance.
localizedRelativeTime(DateTime date, [DateTime? relativeTo, String? locale]) String
Formats a localized relative time string for the active locale on BloomI18n.instance.
max<T extends num>(T maxValue, [String? message]) String? Function(T)
Creates a validator that fails when a numeric value exceeds maxValue.
maxFiles(int count, [String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when more than count files are selected.
maxFileSize(int maxBytes, [String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when any file exceeds maxBytes.
maxItems<T extends Iterable<Object?>>(int n, [String? message]) String? Function(T)
Creates a validator that fails when an Iterable collection has more than n items.
maxLength(int n, [String? message]) String? Function(String)
Creates a validator that fails when a string value exceeds n characters.
maxTotalFileSize(int maxBytes, [String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when the combined size of all files exceeds maxBytes.
Menubar component primitive.
min<T extends num>(T minValue, [String? message]) String? Function(T)
Creates a validator that fails when a numeric value is less than minValue.
minFiles(int count, [String? message]) String? Function(List<BloomFile>)
Creates a validator for BloomFileField that fails when fewer than count files are selected.
minItems<T extends Iterable<Object?>>(int n, [String? message]) String? Function(T)
Creates a validator that fails when an Iterable collection has fewer than n items.
minLength(int n, [String? message]) String? Function(String)
Creates a validator that fails when a string value has fewer than n characters.
mutation<T, P>({required MutationFn<T, P> mutate, List? optimisticKey, OptimisticUpdater<T, P>? optimisticData, List<List> invalidateKeys = const [], OnMutateCallback<P>? onMutate, OnSuccessCallback<T, P>? onSuccess, OnErrorCallback<P>? onError, OnSettledCallback<T, P>? onSettled}) BloomMutation<T, P>
Creates a declarative BloomMutation with optional optimistic rollback and automatic cache invalidation.
Navigation menu component primitive.
nextPageHref(String path, Map<String, String> currentQuery, String nextCursor) String
Builds a next page URL appending nextCursor to the back-stack query.
openAlertDialog({required String title, String? description, BloomNode? body, String confirmLabel = 'Continue', String cancelLabel = 'Cancel', bool destructive = true, required VoidCallback onConfirm, VoidCallback? onCancel}) → void
Opens an alert confirmation dialog (destructive action confirmation).
openCommandPalette(List<({String? group, String label, VoidCallback onSelect})> items, {String placeholder = 'Type a command or search...', VoidCallback? onClose}) → void
Opens the global command palette overlay.
openCommandPaletteDetailed({required List<CommandItemConfig> items, String placeholder = 'Type a command or search...', VoidCallback? onClose}) → void
Opens the global command palette with full item configuration.
openConfirmDialog({required String title, String? description, String confirmLabel = 'Confirm', String cancelLabel = 'Cancel', bool destructive = false, required VoidCallback onConfirm, VoidCallback? onCancel}) → void
Helper for standard confirmation dialogs.
openDialog({required String title, String? description, BloomNode? body, String? confirmLabel, String? cancelLabel, bool destructive = false, VoidCallback? onConfirm, VoidCallback? onCancel}) → void
Opens a general modal dialog.
openDrawer({required String title, String? description, BloomNode? body, String side = 'bottom', bool showCloseButton = true, VoidCallback? onClose}) → void
Opens a mobile-style bottom drawer (or customizable slide-over).
openSheet({required String title, String? description, BloomNode? body, String side = 'right', bool showCloseButton = true, VoidCallback? onClose}) → void
Opens a side-panel sheet.
paginatedQuery<TPage, TParam>({required List key, required Future<TPage> fetch(TParam pageParam), required TParam initialPageParam, required TParam? getNextPageParam(TPage lastPage, List<TPage> allPages), Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool enabled = true, List getItems(TPage page)?, List<TPage>? initialData}) BloomInfiniteQuery<TPage, TParam>
Alias for infiniteQuery.
paginationBar({required String currentPath, required Map<String, String> currentQuery, required int total, required int itemCount, String? nextCursor, int pageSize = 24, String extraClassName = ''}) BloomNode
Reusable cursor-based pagination bar primitive.
parseAcceptLanguage(String? header) List<AcceptLanguageEntry>
Parses an entire Accept-Language header string into a list of entries sorted by quality.
parseFragment(String location) String
Extracts the hash fragment from a URL or location string without the leading #.
parseQueryString(String location) Map<String, String>
Parses a URL or query string into a single-value map of query parameters.
parseQueryStringAll(String location) Map<String, List<String>>
Parses a URL or query string into a multi-value map preserving repeated keys.
pattern(RegExp re, [String? message]) String? Function(String)
Creates a validator that fails when a string value does not match regular expression re.
popover({required BloomNode trigger, required BloomNode content, String align = 'center', String extraClassName = ''}) BloomNode
Popover container with per-instance reactive state and backdrop click-to-close.
prevPageHref(String path, Map<String, String> currentQuery) String
Builds a previous page URL restoring the cursor from the back-stack query.
progress({required double value, double max = 100.0, String? label, bool showValue = false, String extraClassName = ''}) BloomNode
Determinate linear progress bar primitive.
provide<T>(FactoryFunc<T> factory) → void
Registers a transient factory on the globalContainer.
provideSingleton<T>(FactoryFunc<T> factory, {bool lazy = true}) → void
Registers a singleton factory on the globalContainer.
provideValue<T>(T value) → void
Registers an existing instance value on the globalContainer.
query<T>({required List key, required Future<T> fetch(), Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool enabled = true, T? initialData}) BloomQuery<T>
Creates a reactive BloomQuery configured with key, fetch, and caching durations.
radioGroup({required List<({String label, String value})> options, required String value, required void onChange(String value), String? name, bool disabled = false, String orientation = 'vertical', String extraClassName = ''}) BloomNode
Controlled radio group primitive.
range<T extends num>(T minValue, T maxValue, [String? message]) String? Function(T)
Creates a validator that fails when a numeric value falls outside the inclusive range [minValue, maxValue].
rangeItems<T extends Iterable<Object?>>(int minN, int maxN, [String? message]) String? Function(T)
Creates a validator that fails when an Iterable collection item count is outside [minN, maxN].
readonly<T>(Signal<T> signal) ReadonlySignal<T>
Creates a read-only view of signal to prevent external mutation.
realtimeBinding(BloomRealtimeChannelClient client) BloomRealtimeBinding
Creates a BloomRealtimeBinding wrapping client.
renderDevErrorOverlay(Object error, StackTrace stackTrace, {String? componentName, String? sourceHint}) String
Generates a standalone HTML fragment displaying an unhandled exception for development diagnostics.
renderDevErrorOverlayJson(Object error, StackTrace stackTrace, {String? componentName, String? sourceHint}) String
Generates a JSON payload representation of a development error overlay.
renderForTest(BloomNode node) BloomTestRenderer
Creates a BloomTestRenderer wrapping node for headless VM unit testing.
renderToDocument(BloomNode body, {String lang = 'en', String charset = 'UTF-8', String? title, List<BloomNode> head = const [], String? importMapJson, List<String> stylesheets = const [], List<String> scripts = const []}) String
Renders a complete HTML5 document wrapping body with standard boilerplate.
renderToHtml(BloomNode node) String
Renders a BloomNode descriptor tree synchronously to an HTML string.
renderToHtmlAll(List<BloomNode> nodes) String
Renders multiple BloomNode root fragments sequentially into a single HTML string.
renderToStream(BloomNode node) Stream<String>
Synchronously renders node to an HTML string and streams the output in fixed 4KB chunks.
renderToStreamWithSuspense(BloomNode node) Stream<String>
Progressively streams HTML with out-of-order resolution for asynchronous Suspense boundaries.
required([String? message]) String? Function(String)
Creates a validator that fails when a string value is empty or consists solely of whitespace.
requiredTrue([String? message]) String? Function(bool)
Creates a validator for boolean fields that fails when the value is false.
requiredValue<T>([String? message]) String? Function(T?)
Creates a generic validator that fails when a value is null, an empty string, or an empty collection.
resetActiveContainer() → void
Resets the ambient global container to a fresh, empty BloomContainer.
resizablePanels({required BloomNode first, required BloomNode second, bool vertical = false, double initialSplit = 0.5, double minSplit = 0.1, double maxSplit = 0.9, bool withHandle = true, String extraClassName = ''}) BloomNode
Resizable split-pane layout component.
resolveLocale(List<String> preferences, {List<String>? supported, String fallback = 'en-US'}) String
Resolves an active locale from an ordered list of preferences (e.g. navigator.languages).
rpcContract<TInput, TOutput>({required BloomHttpMethod method, required String pathTemplate, dynamic encodeInput(TInput input)?, TInput decodeInput(dynamic json)?, dynamic encodeOutput(TOutput output)?, TOutput decodeOutput(dynamic json)?, String? summary, String? description, List customCacheKey(TInput input)?}) BloomRpcContract<TInput, TOutput>
Convenience factory function for declaring a BloomRpcContract.
rpcMutation<TInput, TOutput>(BloomRpcClient client, BloomRpcContract<TInput, TOutput> contract, {List<List> invalidateKeys = const [], List<BloomRpcContract> invalidateContracts = const [], Map<String, dynamic>? pathParamsBuilder(TInput input)?, Map<String, dynamic>? defaultPathParams, Map<String, dynamic>? queryParameters, Map<String, String>? headers, Duration? timeout, List? optimisticKey, OptimisticUpdater<TOutput, TInput>? optimisticData, OnMutateCallback<TInput>? onMutate, OnSuccessCallback<TOutput, TInput>? onSuccess, OnErrorCallback<TInput>? onError, OnSettledCallback<TOutput, TInput>? onSettled}) BloomMutation<TOutput, TInput>
Creates a declarative BloomMutation bound to an RPC contract.
rpcQuery<TInput, TOutput>(BloomRpcClient client, BloomRpcContract<TInput, TOutput> contract, TInput input, {Map<String, dynamic>? pathParams, Map<String, dynamic>? queryParameters, Map<String, String>? headers, Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool enabled = true, TOutput? initialData, List? customKey, Duration? timeout}) BloomQuery<TOutput>
Creates a reactive BloomQuery bound to an RPC contract and input.
runBloomMobile(BloomNode rootNode, {String title = 'Bloom Mobile App'}) → void
Mounts and runs a pure-Dart Bloom AST descriptor tree as a native mobile application.
scheduleTransition<T>(FutureOr<T> update()) SchedulerTask<T>
Schedules a non-urgent transition task returning a SchedulerTask handle.
scopedCss(String css, {String? name}) ScopedCss
Creates a new ScopedCss module from css with an optional component name.
scrollArea({required BloomNode child, double? maxHeight, double? maxWidth, String orientation = 'vertical', String extraClassName = ''}) BloomNode
Scroll area component with customized lightweight scrollbars.
selectInput({required String id, String? name, required String value, required List<({String label, String value})> options, bool disabled = false, bool hasError = false, String? placeholder, BloomEventHandler? onChange, void onValueChange(String)?, String extraClassName = '', Map<String, String> attrs = const {}}) BloomNode
Native styled <select> dropdown primitive for Bloom UI.
separator({bool vertical = false, String extraClassName = '', Map<String, String> attrs = const {}}) BloomNode
Horizontal or vertical divider primitive.
setActiveContainer(BloomContainer container) → void
Replaces the ambient global container with container.
setLocale(String locale) → void
Changes the active locale globally on BloomI18n.instance.
sheetViewport() BloomNode
Root viewport component for rendering active slide-over sheets and bottom drawers.
showToast(String message, {ToastVariant variant = ToastVariant.info, Duration duration = const Duration(seconds: 4), String? actionLabel, void onAction()?}) → void
Dispatches a toast notification to the global toast queue.
signal<T>(T initialValue, {String? key}) Signal<T>
Creates a reactive Signal container initialized to initialValue.
skeleton({String extraClassName = '', String? style}) BloomNode
Skeleton placeholder primitive with pulse loading animation.
slider({required double value, required double min, required double max, double step = 1, required void onChange(double value), bool disabled = false, String extraClassName = ''}) BloomNode
Controlled range slider primitive.
sparkline({required List<double> values, double width = 120, double height = 32, String? color, String extraClassName = ''}) BloomNode
Lightweight inline SVG sparkline component.
startTransition(FutureOr<void> update()) → void
Defers a non-urgent state update to a low-priority scheduled task while tracking transition status via isTransitionPending.
switchToggle({required bool checked, required void onChange(bool), bool disabled = false, String? id, String? name, String extraClassName = ''}) BloomNode
Toggle switch primitive (named switchToggle as switch is a reserved word in Dart).
t(String messageId, {Map<String, Object>? args, String? locale}) String
Translates messageId for the current active locale, automatically tracking reactivity.
table({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Semantic <table> wrapper container primitive.
tableBody({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Semantic <tbody> table body element.
tableCaption({required String text, String extraClassName = ''}) BloomNode
Semantic <caption> table caption element.
tableCell({String? text, List<BloomNode>? children, String extraClassName = '', int? colSpan, int? rowSpan}) BloomNode
Semantic <td> table data cell element.
tableFooter({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Semantic <tfoot> table footer element.
tableHead({String? text, List<BloomNode>? children, String extraClassName = '', int? colSpan, int? rowSpan}) BloomNode
Semantic <th> table header cell element.
tableHeader({required List<BloomNode> children, String extraClassName = ''}) BloomNode
Semantic <thead> table header element.
tableRow({required List<BloomNode> children, String extraClassName = '', BloomEventHandler? onClick}) BloomNode
Semantic <tr> table row element.
tabs({required List<({String key, String label})> items, required String activeKey, required void onChange(String key), required BloomNode content(String key), String extraClassName = ''}) BloomNode
Controlled tabs component.
textarea({required String id, String? name, String? value, String? placeholder, int rows = 4, int? cols, bool disabled = false, bool required = false, bool hasError = false, String? ariaDescribedBy, String extraClassName = '', BloomEventHandler? onInput, BloomEventHandler? onChange, BloomEventHandler? onFocus, BloomEventHandler? onBlur, Map<String, String> attrs = const {}}) BloomNode
Multi-line text editing primitive for Bloom UI.
textInput({required String id, String? name, String? value, String? placeholder, String type = 'text', String? prefix, BloomNode? prefixNode, String? suffix, BloomNode? suffixNode, bool disabled = false, bool required = false, bool hasError = false, String? ariaDescribedBy, String extraClassName = '', BloomEventHandler? onInput, BloomEventHandler? onChange, BloomEventHandler? onKeyDown, BloomEventHandler? onFocus, BloomEventHandler? onBlur, Map<String, String> attrs = const {}}) BloomNode
Text input primitive for Bloom UI.
toastViewport() BloomNode
Viewport container mounted at application root to render active toasts.
toggle({required bool pressed, required void onChange(bool pressed), required BloomNode child, ToggleVariant variant = ToggleVariant.defaultVariant, ToggleSize size = ToggleSize.defaultSize, bool disabled = false, String extraClassName = ''}) BloomNode
Single two-state toggle button primitive.
toggleGroupMultiple<T>({required List<ToggleGroupItem<T>> items, required Set<T> value, required void onChange(Set<T> value), ToggleVariant variant = ToggleVariant.defaultVariant, ToggleSize size = ToggleSize.defaultSize, String orientation = 'horizontal', String extraClassName = ''}) BloomNode
Controlled toggle group supporting multiple selections.
toggleGroupSingle<T>({required List<ToggleGroupItem<T>> items, required T? value, required void onChange(T value), ToggleVariant variant = ToggleVariant.defaultVariant, ToggleSize size = ToggleSize.defaultSize, String orientation = 'horizontal', String extraClassName = ''}) BloomNode
Controlled toggle group supporting single-selection.
tooltip({required String label, required BloomNode child, String side = 'top', String extraClassName = ''}) BloomNode
Pure CSS tooltip component with hover and focus-within reveal triggers.
tr(String messageId, [Map<String, Object>? args]) String
Shorthand translation alias accepting positional args.
typedRequired<T>([String? message]) String? Function(T?)
Alias for requiredValue validator.
uiIcon(String name, {String className = 'w-4 h-4'}) BloomNode
Helper returning a BloomNode for an icon name.
untracked<T>(UntrackedCallback<T> fn) → T
In case when you're receiving a callback that can read some signals, but you don't want to subscribe to them, you can use untracked to prevent any subscriptions from happening.
useContext<T>(BloomContext<T> context) → T
Reads the current ambient value for context from the surrounding Zone.
useReducer<S, A>(BloomReducerFn<S, A> reducerFn, S initialState) BloomReducer<S, A>
Creates a BloomReducer with the given reducerFn and initialState.
visuallyHiddenStyleNode() StyleNode
Emits a <style> block declaring the .bloom-sr-only and .sr-only CSS utility classes.

Typedefs

AccordionItem = ({BloomNode content, String id, String title})
Accordion item descriptor.
BloomArrayAsyncValidator<T extends BloomFormControl> = Future<String?> Function(List<T> controls)
Signature for an asynchronous validator callback on a BloomFieldArray.
BloomAsyncValidator<T> = Future<String?> Function(T value)
Signature for an asynchronous validator callback on a single value of type T.
BloomEventHandler = void Function(BloomEvent event)
Callback handler signature for Bloom DOM events.
BloomField<T> = BloomTypedFormField<T>
Generic shorthand alias for BloomTypedFormField.
BloomFormArray<T extends BloomFormControl> = BloomFieldArray<T>
Alias for BloomFieldArray representing a repeating list of form controls.
BloomGroupAsyncValidator = Future<String?> Function(Map<String, dynamic> values)
Signature for an asynchronous validator callback on a BloomFormGroup.
BloomNestedForm = BloomFormGroup
Alias for BloomFormGroup representing a nested sub-form.
BloomPaginatedQuery<TPage, TParam> = BloomInfiniteQuery<TPage, TParam>
Alias for BloomInfiniteQuery.
BloomReducerFn<S, A> = S Function(S state, A action)
A pure state-transition function that computes the next state from the current state and an action.
BloomRpcHandler<TInput, TOutput> = FutureOr<TOutput> Function(BloomRpcServerContext context, TInput input)
Server-side handler callback signature that implements a BloomRpcContract.
BloomSubForm = BloomFormGroup
Alias for BloomFormGroup representing a nested sub-form.
ChartDataPoint = ({String label, double value})
Data point for a simple bar chart.
FactoryFunc<T> = T Function()
Factory function callback that instantiates a dependency of type T.
GetNextPageParamFn<TPage, TParam> = TParam? Function(TPage lastPage, List<TPage> allPages)
Function signature for deriving the next page parameter from the lastPage and allPages.
ImageUrlBuilder = String Function(String src, int width)
Function signature for generating width-specific image URLs for responsive srcset sets.
InfiniteQueryFn<TPage, TParam> = Future<TPage> Function(TParam pageParam)
Function signature for fetching a single page of type TPage using page parameter TParam.
LinkPrefetch = PrefetchMode
Convenience alias for PrefetchMode.
Single top-level menu in a menubar.
MutationFn<T, P> = Future<T> Function(P params)
The asynchronous execution function that performs a mutation operation.
OnErrorCallback<P> = FutureOr<void> Function(Object error, P params, dynamic context)
Lifecycle hook invoked when a mutation throws an error.
OnMutateCallback<P> = FutureOr Function(P params)
Lifecycle hook called immediately prior to executing a mutation.
OnSettledCallback<T, P> = FutureOr<void> Function(T? data, Object? error, P params, dynamic context)
Lifecycle hook invoked when a mutation settles (either resolved successfully or failed with an error).
OnSuccessCallback<T, P> = FutureOr<void> Function(T data, P params, dynamic context)
Lifecycle hook invoked upon successful completion of a mutation.
OptimisticUpdater<T, P> = T? Function(P params, T? oldData)
Optimistic update transformation function updating cached data in BloomData prior to network response.
RequestInterceptor = FutureOr<BaseRequest> Function(BaseRequest request)
Interceptor callback that transforms or inspects an outgoing http.BaseRequest before transmission.
ResponseInterceptor = FutureOr<Response> Function(Response response)
Interceptor callback that transforms or inspects an incoming http.Response before returning to callers.
ToggleGroupItem<T> = ({String? ariaLabel, BloomNode child, T value})
Single item in a toggleGroupSingle or toggleGroupMultiple.
VoidCallback = void Function()

Exceptions / Errors

BloomEnvironmentException
Exception thrown when environment schema validation or variable parsing fails.
BloomRedirectLoopException
Thrown by BloomRouter.resolveRedirects when guard redirects loop.
BloomRpcCancelledException
Exception thrown when an in-flight RPC request is aborted via BloomRpcCancelToken.
BloomRpcDecodeException
Exception thrown when a 2xx response payload fails to decode into the expected output type TOutput.
BloomRpcEncodeException
Exception thrown when serializing input data into a request payload fails before transmission.
BloomRpcException
Abstract base exception class for all RPC errors.
BloomRpcHttpException
Exception thrown when the server returns a non-2xx HTTP error status code.
BloomRpcPathParameterException
Exception thrown when a required path parameter in a contract path template is missing.
BloomRpcTimeoutException
Exception thrown when an RPC request exceeds the configured network timeout duration.
BloomRpcTransportException
Exception thrown when an RPC call fails due to low-level transport, DNS, or socket errors.