bloom library

Comprehensive, all-in-one Flutter application barrel for the Bloom framework.

Exports all core modules, state management signals, dependency injection, full-stack data/query utilities, routing, native platform bridges, devtools, over-the-air updates, observability, and UI widgets for building complete Bloom applications.

Example:

import 'package:bloom_framework/bloom.dart';

void main() async {
  await Bloom.boot(
    appName: 'MyApp',
    builder: (context) => const BloomApp(
      title: 'My Bloom App',
    ),
  );
}

Classes

ActionResult
Result returned from a route form action handler.
AndroidPlatform
Android platform build configuration settings.
Bloom
The core Bloom framework controller and global entrypoint.
BloomAction
Annotation marking a server-side or client form action handler for a route.
BloomApiRouter
High-performance server router for Bloom API routes, WebSocket gateways, and SSR endpoints.
BloomApp
Root application widget for Bloom applications.
BloomAppConfig
Strongly typed application configuration model for bloom.config.dart.
BloomAsyncFunction
Metadata annotation declaring an asynchronous native function bridge.
BloomAuth<U>
Reactive user session manager and persistent authentication layer.
BloomAuthBase
Base non-generic interface for Bloom authentication session management.
BloomAuthGuard
Standard authentication route guard protecting authenticated screens.
BloomBackground
Manages background task execution and background periodic synchronization.
BloomBootstrapper
Contract for custom user bootstrapper code in lib/app/boot.dart.
BloomBreadcrumb
A structured breadcrumb recording a user action, network call, or state mutation.
BloomBreadcrumbRingBuffer
Fixed-capacity ring buffer for storing recent chronological breadcrumbs.
BloomCamera
Camera capture and photo gallery interface for Bloom applications wrapping image_picker.
BloomCapturedPhoto
Represents an image file captured from the device camera or picked from the gallery.
BloomConfig
Strongly typed configuration model mapping directly to bloom.yaml.
BloomConstant
Metadata annotation declaring a static constant exported by the host native platform.
BloomContainer
Lightweight, high-performance Dependency Injection container for Bloom.
BloomController
Base class for Bloom state controllers.
BloomCorsMiddleware
Built-in Cross-Origin Resource Sharing (CORS) middleware for Bloom API endpoints.
BloomCrashFingerprint
Utilities for calculating deterministic crash grouping fingerprints.
BloomCrudRepository<T, ID>
Generic CRUD repository interface for typed entities composing read and write contracts.
BloomData
Global query cache manager for Bloom Data with automated periodic TTL garbage collection and request deduplication.
Cross-platform deep linking and Universal / App Links controller.
BloomDeepLinksConfig
Deep link URL scheme and universal link domain configuration.
BloomDeploymentConfig
Deployment block configuration in bloom.yaml.
BloomDev
Developer tooling harness for simulating network latency, outages, and failure rates.
BloomDevOverlay
Universal in-app developer modal and diagnostics overlay for Bloom applications and Bloom Go.
BloomDevServerDiscovery
UDP discovery service for scanning LAN networks for active Bloom Dev Servers on port 5354.
BloomDevToolsService
Registers Bloom DevTools VM service extensions for live visual debugging.
BloomDiscoveredServer
Represents a Bloom dev server discovered on the local area network.
BloomEnv
Environment configuration parser, store, and type-safe reader.
BloomEnvironmentSchema
Abstract base class for strictly typed and validated environment variable schemas.
BloomEvent
Metadata annotation declaring a native event listener.
BloomFeatureFlags
Dynamic, reactive feature flags management engine for Bloom applications.
BloomFeatures
Feature flags and subsystem toggles declared in bloom.yaml.
BloomFlavorConfig
Configuration for a specific application build flavor (e.g. staging, production).
BloomGoClient
Client protocol handler for Bloom Go mobile applications connecting to dev servers.
BloomGuard
Abstract contract for route guards (e.g. authentication, role permissions, feature flags).
BloomHttpClient
HTTP client with environment base URL resolution, JSON codecs, Bearer auth token injection, DevTools tracing, and simulation hooks.
BloomHttpTelemetryTransport
Production HTTP transport that posts JSON telemetry payloads to a remote collector endpoint.
BloomHttpUpdateAdapter
Real HTTP and CDN network adapter for checking, downloading, and verifying OTA patches.
BloomJsonStorage
JSON object storage with optional TTL expiration.
BloomLayout
Base class for persistent shell and tab layouts.
BloomLifecycleHook
Metadata annotation declaring a host application lifecycle listener.
BloomLifecycleManager
Central manager coordinating application-wide lifecycle events.
BloomLoader
Annotation marking a server-side or build-time data loader for a route.
BloomLogger
Standardized structured logging system for Bloom servers, apps, and microservices.
The real Bloom five-petal gradient flower mark, matching the brand SVG used across bloom.dev and the Cloud dashboard (bloom-logo.tsx).
BloomMemoryTelemetryTransport
In-memory transport storing telemetry events in a list (ideal for unit testing and debugging).
BloomMiddleware
Composable middleware interface for Bloom API routes, full-stack SSR servers, and gateways.
BloomModule
Metadata annotation declaring a Bloom Native Module.
BloomModuleManifest
Strongly typed manifest representation of bloom.module.yaml.
BloomModulePermission
Represents a permission declared in bloom.module.yaml.
BloomModulePlatformSpec
Platform constraints, dependencies, and native frameworks for a Bloom Native Module.
BloomModuleRegistry
Central singleton registry managing the lifecycle, registration, and discovery of Bloom Native Modules.
BloomMutation<T, P>
Asynchronous mutation manager with automated optimistic updates, automatic rollback, and cache invalidation.
BloomNativeModule
Base class for all native Bloom modules bridging Dart to host iOS/Android platforms.
BloomNativeView
A cross-platform bridge widget for hosting hardware-accelerated native views (e.g. Camera Preview, MapKit/Google Maps, AR views, WebViews) declared in Bloom Modules.
BloomNetworkInspector
Central network inspection and request replay engine for Bloom DevTools.
BloomNetworkTrace
Recorded network request / response trace event.
BloomNotificationChannel
Represents an Android notification channel configuration for Android 8.0 (API 26) and newer.
BloomNotifications
Cross-platform push and local notifications manager wrapping flutter_local_notifications.
BloomObservability
Core Error Observability, Crash Reporting, and Telemetry Engine for Bloom.
BloomObservabilityConfig
Configuration options for Bloom Error Observability and Telemetry SDK.
BloomObservabilityNavigatorObserver
NavigatorObserver that automatically records route transition breadcrumbs.
BloomOTA
Over-The-Air (OTA) update and code-push controller powered by Shorebird.
BloomOtaPatch
Represents an available OTA patch descriptor.
BloomPermissions
Central native permissions manager for Bloom applications wrapping permission_handler.
BloomPlatforms
Target platforms configuration declared in bloom.yaml.
BloomPlugin
A strongly typed plugin reference declared in bloom.config.dart.
BloomProjectManifest
Project manifest delivered by the Bloom dev server for Bloom Go mobile apps.
BloomQuery<T>
A reactive asynchronous query with automatic caching, stale-while-revalidate, and deduplication.
BloomQueryCacheInspector
Visual query cache inspection and management engine for Bloom DevTools.
BloomReadOnlyRepository<T, ID>
Lean read-only repository interface for query-only data access (Interface Segregation Principle).
BloomRepository
Base repository pattern class for encapsulating API communication.
BloomRequest
Represents an incoming HTTP request in Bloom API routes, SSR endpoints, and middleware.
BloomResponse
Represents an HTTP response returned from a Bloom API route handler or middleware.
BloomRoute
Base class for Bloom page and screen widgets.
BloomRouteConfig
Annotation for declaring route metadata and guards on BloomRoute classes.
BloomRouteContext
Route execution context provided to loaders, actions, and metadata builders.
BloomRouteGroup
Represents a scoped route group in BloomApiRouter sharing a URL prefix and middleware pipeline.
BloomRouteMatch
Metadata match information passed to guards and route builders.
BloomRouteMetadata
Declarative SEO, OpenGraph, and Twitter Card metadata configuration for Bloom routes.
BloomRouter
Central Bloom router orchestrating declarative navigation, deep links, and route guards.
BloomRuntimeFingerprint
Cryptographic Runtime Fingerprint generator and validator.
BloomSecureStorage
Encrypted key-value secure storage wrapping flutter_secure_storage (iOS Keychain / Android EncryptedSharedPreferences).
BloomServerpodClient
Official Bloom client adapter for Serverpod backend connections.
BloomServerpodRepository<T>
CRUD repository adapter bridging Serverpod endpoint delegates to Bloom Data conventions.
BloomShorebirdConfig
Shorebird OTA (Over-The-Air) deployment configuration declared in bloom.yaml.
BloomSignalsInspector
Visual inspection engine for the Bloom Signals state tree.
BloomStorageAdapter
Abstract storage adapter contract for key-value persistence.
BloomStream
Metadata annotation declaring a continuous native hardware stream.
BloomStreamSignal<T>
A reactive signal bound to a real-time stream subscription with explicit lifecycle disposal.
BloomSupabaseAuthAdapter
Official Bloom authentication adapter for Supabase with real token refresh support.
BloomSupabaseTableRepository<T>
Strongly-typed CRUD repository adapter for Supabase REST tables.
BloomSupabaseUser
Represents an authenticated Supabase user profile.
BloomSyncFunction
Metadata annotation declaring a fast synchronous native function bridge.
BloomTelemetryEvent
A complete structured crash / telemetry event payload.
BloomTelemetryTransport
Transport contract for dispatching telemetry and crash events.
BloomTestOverride<T>
Represents a typed test override instance to be injected into a BloomTestScope.
BloomTestScope
A scoped DI harness for running unit and integration tests with isolated overrides.
BloomUpdateBanner
Pre-built reactive in-app update banner.
BloomUpdateClientAdapter
Network and platform adapter contract for fetching and applying OTA updates.
BloomUpdateDialog
Modal dialog for mandatory or recommended OTA updates.
BloomUpdates
Enterprise-grade Over-The-Air (OTA) Updates and Runtime Fingerprint Engine.
BloomView
Metadata annotation declaring a native platform view (e.g. Camera preview, Map, AR view).
BloomWriteRepository<T, ID>
Lean write-only/mutation repository interface (Interface Segregation Principle).
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.
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.
FileStorageAdapter
File-based storage adapter providing real persistence on disk across application restarts.
FunctionalBloomMiddleware
Function-based middleware implementation wrapping a standalone handler callback.
GoRoute Get started Configuration Redirection Transition animations Named routes
A route that is displayed visually above the matching parent route using the Navigator.
GoRouter Get started Upgrading Configuration Navigation Redirection Web Deep linking Named routes Error handling
The route configuration for the app.
GoRouterState
The route state during routing.
GuardResult
The result returned by a BloomGuard when evaluating navigation access.
InMemoryStorageAdapter
In-memory storage adapter for testing and rapid prototyping.
InMemoryWatchdogStorage
In-memory default implementation of WatchdogStorage (useful for testing).
IosPlatform
iOS platform build configuration settings.
MockBloomUpdateClientAdapter
In-memory mock client adapter used in development and tests.
OfflineMutationQueue
Persistent offline mutation buffer and replay engine.
OpenGraph
OpenGraph metadata configuration for rich social media previews.
PlatformsConfig
Combined platforms configuration block aggregating Android, iOS, and Web settings.
QueryCacheDescriptor
Visual descriptor for a cached query record displayed in DevTools.
QueryCacheEntry<T>
A single cached query record containing fetched data, timestamps, and TTL settings.
QueuedMutation
A persisted mutation entry stored in the offline queue waiting to be synced with the server.
ReadonlySignal<T>
Read only signals can just retrieve a value but not update or cause mutations
RouteBase
The base class for GoRoute and ShellRoute.
ShellRoute Configuration
A route that displays a UI shell around the matching child route.
Signal<T>
AsyncState is class commonly used with Future/Stream signals to represent the states the signal can be in.
SignalBuilder<T>
A typed builder widget that rebuilds whenever the targeted signal value changes.
SignalDescriptor
Visual descriptor for a tracked reactive signal displayed in DevTools.
StagedRolloutEvaluator
Evaluates deterministic staged percentage rollouts for OTA updates.
StartupCrashWatchdog
Self-healing startup watchdog that detects crash loops on downloaded OTA patches and automatically falls back to the embedded base binary.
TwitterCard
Twitter Card metadata for rich Twitter social previews.
UpdateCheckResult
Result returned from BloomUpdates.checkForUpdate().
UpdateManifest
Manifest describing a downloadable Over-The-Air (OTA) patch.
Watch<T extends Widget>
Watch
WatchdogStorage
Delegate interface for persisting watchdog crash counts and active patch states across restarts.
WebPlatform
Web platform build configuration settings.

Enums

BloomBreadcrumbLevel
Severity level for breadcrumb events.
BloomErrorLevel
Severity level for telemetry and crash events.
BloomLifecycleEvent
Application lifecycle events forwarded to registered Bloom Native Modules.
BloomLogLevel
Log severity levels for Bloom applications.
BloomOtaStatus
Status events emitted during OTA code patch lifecycle.
BloomPermission
Native hardware and system permission types supported by Bloom applications.
BloomPermissionStatus
Permission authorization status returned by host platforms.
BloomServerpodConnectionStatus
Serverpod streaming connection status.
ConflictPolicy
Conflict resolution strategy when replaying offline mutations against the server.
MutationStatus
Lifecycle execution status of a BloomMutation.
NativeMode
Native execution mode for Bloom projects.
NativeThread
Execution thread model for native module operations on host platforms (iOS/Android).
NotificationImportance
Importance levels for notification priority and alerts.
QueryStatus
Execution status of a BloomQuery.

Mixins

BloomLifecycleObserver
Mixin for classes that observe Flutter application lifecycle transitions.
SignalsMixin<T extends StatefulWidget>
Signals mixin that will automatically rebuild the widget tree when any of the signals change and dispose of any signals and effects created locally.

Extensions

GoRouterHelper on BuildContext
Dart extension to add navigation function to a BuildContext object, e.g. context.go('/');

Properties

globalContainer BloomContainer
Accesses the global active Bloom DI container.
no setter
logger BloomLogger
Global standard logger instance for Bloom framework and applications.
final

Functions

batch<T>(T cb()) → T
Batches multiple signal updates into a single synchronous notification cycle.
bloomBackgroundCallbackDispatcher() → void
Top-level background callback dispatcher for native OS background execution.
computed<T>(T compute(), {String? debugLabel}) Computed<T>
Creates a computed (derived) reactive value.
effect(void cb(), {String? debugLabel}) → void Function()
Runs a reactive side-effect callback cb whenever any accessed signal changes.
inject<T>() → T
Resolves a dependency of type T from the global active Bloom container.
injectOrNull<T>() → T?
Resolves an optional dependency of type T from the global active Bloom container, or returns null if not registered.
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 mutation with optional automated optimistic rollback and cache invalidation.
provide<T>(FactoryFunc<T> factory) → void
Registers a transient factory on the global active Bloom container.
provideSingleton<T>(FactoryFunc<T> factory, {bool lazy = true}) → void
Registers a singleton factory on the global active Bloom container.
provideValue<T>(T value) → void
Registers an existing instance value on the global active Bloom container.
query<T>({required List key, required QueryFetcher<T> fetch, Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool enabled = true, int retry = 2, Duration retryDelay = const Duration(milliseconds: 500)}) BloomQuery<T>
Creates a declarative, cached asynchronous query.
readonly<T>(Signal<T> signal) ReadonlySignal<T>
Creates a read-only view of a signal.
resetActiveContainer() → void
Resets the global active container to a fresh, empty BloomContainer instance.
setActiveContainer(BloomContainer container) → void
Sets the currently active global container (used by BloomTestScope for test isolation).
signal<T>(T initialValue, {String? debugLabel}) Signal<T>
Creates a fine-grained reactive state signal with an initialValue.

Typedefs

BackgroundTaskCallback = FutureOr<bool> Function(Map<String, dynamic> data)
Callback signature for asynchronous background task execution.
BeforeSendCallback = BloomTelemetryEvent? Function(BloomTelemetryEvent event)
Callback signature for intercepting, modifying, or dropping telemetry events before transmission.
BloomDiscoveryListener = BloomDevServerDiscovery
Alias for backwards compatibility with Bloom Go discovery listener.
BloomLogWriter = void Function(String message)
Callback signature for handling formatted log line outputs.
BloomNextFunction = Future<BloomResponse> Function()
Next-handler callback invoked by middleware to pass control to the subsequent middleware or route handler in the pipeline.
BloomRouteHandler = FutureOr<BloomResponse> Function(BloomRequest request)
Handler function signature for Bloom server route endpoints.
CustomConflictResolver = FutureOr<Map<String, dynamic>?> Function(Map<String, dynamic> clientPayload, Object serverError)
Custom conflict resolution handler resolving differences between client payload and server error.
DeepLinkHandler = FutureOr<void> Function(Uri uri)
Handler callback signature invoked when a deep link URI is received.
FactoryFunc<T> = T Function()
Factory function callback that instantiates a dependency of type T.
MutationExecutor = Future Function(Map<String, dynamic> payload)
Execution function that sends an offline mutation payload to the server.
MutationFn<T, P> = Future<T> Function(P params)
The asynchronous execution function that performs the mutation operation.
OnErrorCallback<P> = FutureOr<void> Function(Object error, P params, dynamic context)
Hook called when a mutation throws an error.
OnMutateCallback<P> = FutureOr Function(P params)
Hook called immediately prior to executing the mutation, returning an optional context object.
OnSettledCallback<T, P> = FutureOr<void> Function(T? data, Object? error, P params, dynamic context)
Hook called after mutation settled (either succeeded or failed).
OnSuccessCallback<T, P> = FutureOr<void> Function(T data, P params, dynamic context)
Hook called upon successful mutation completion.
OptimisticUpdater<T, P> = T? Function(P params, T? oldData)
Optimistic update transformation function updating cached data prior to network response.
QueryFetcher<T> = Future<T> Function()
Asynchronous data fetcher function for a query.
RequestInterceptor = FutureOr<BaseRequest> Function(BaseRequest request)
Interceptor callback that transforms an outgoing http.BaseRequest before sending.
ResponseInterceptor = FutureOr<Response> Function(Response response)
Interceptor callback that transforms an incoming http.Response before returning to callers.

Exceptions / Errors

BloomEnvironmentException
Exception thrown when environment schema validation fails or a required variable is missing/invalid.
BloomHttpException
Exception thrown when telemetry transmission over HTTP fails.
BloomNativeConfigurationException
Thrown when a native module encounters invalid configuration or missing keys in bloom.yaml or module manifests.
BloomNativeException
Base exception for errors originating across the Bloom Native Module boundary.
BloomNativeHardwareUnavailableException
Thrown when a hardware sensor, camera, or peripheral device is busy, absent, or disabled.
BloomNativeOperationFailedException
Thrown when an internal native SDK operation or bridge promise rejected on the host platform.
BloomNativePermissionDeniedException
Thrown when a required native OS permission was denied, restricted, or permanently blocked.
BloomOfflineException
Exception thrown when a simulated offline network call is executed.