boot library

Boot Framework — compile-time DI and HTTP framework for Dart.

This is the umbrella package that re-exports all Boot modules. For library authors who only need DI, depend on boot_core instead.

Classes

$HttpClientConfigDefinition
$HttpClientFactory_httpClientDefinition
$HttpClientFactoryDefinition
AnnotationType
Identifies an annotation type by its fully qualified package URI.
AnnotationValue
A compile-time resolved annotation instance with its member values.
Around
Meta-annotation: marks an annotation as providing Around advice.
Authentication
Represents an authenticated user.
AuthenticationProvider
Implement to provide authentication logic (e.g., validate JWT, check credentials). Boot discovers all AuthenticationProvider beans and tries them in order.
AuthenticationRequest
The authentication request — carries all connection context for credential extraction. Works for HTTP, WebSocket, mTLS — providers check what's available.
BeanContainer
Lightweight DI container populated by generated code at startup.
BeanDefinition
Compile-time generated bean definition.
BeanSource
Meta-annotation that marks an annotation as a bean source.
BearerTokenReader
Default TokenReader that extracts tokens from the Authorization: Bearer header.
Body
Deserializes the request body into the annotated parameter type.
Boot
Main entry point for Boot applications.
BootApplication
Marks the application entry point class.
BootConfig
Runtime configuration source.
BootContext
Request-scoped context using Dart Zones.
BootContextKeys
Well-known context keys.
BootLibrary
Marks a package as a Boot library module.
BootRouter
Boot's router. Collects route entries and builds a shelf Router internally.
BootServer
Boot's HTTP server. Wraps shelf_io internally. Protected by a zone guard — unhandled exceptions log and recover, never crash.
Client
Declares a compile-time generated HTTP client from an interface.
ClientFilter
Annotation for client-side HTTP filters. Apply to a class that implements HttpClientFilter.
ClientFilterChain
Filter chain for client-side filters.
ClientResponse
Response from an HTTP client call.
ConfigurationProperties
Marks a class as a configuration-bound singleton bean.
ConsoleLogHandler
Default console log handler — outputs JSON or text to stdout.
Consumes
Declares the content type(s) consumed by a controller method. Default is application/json.
Controller
Marks a class as an HTTP controller with a base path.
CookieValue
Extracts a cookie value into the annotated parameter.
CorsConfiguration
CORS configuration, read from boot.http.cors.* in application.yml.
Delete
Deserializable
Marks a class for deserialization only (fromJson).
EachProperty
Marks a class as a config-driven multi-instance bean.
EventBus
Publishes events to all registered listeners.
EventListener
Marks a method as an event listener. The method's parameter type determines which events it receives.
EventListenerWiringProcessor
Wires @EventListener methods to the EventBus at runtime.
ExceptionHandler<E>
Implement this interface to handle a specific exception/error type. Register as a @Singleton — Boot auto-discovers and routes exceptions to the matching handler.
Factory
Marks a class as a bean factory. Methods annotated with @Singleton or @Prototype produce beans that are registered in the container.
FilterChain
Filter chain — call proceed() to invoke the next filter or the handler.
FormData
Represents parsed multipart form data (fields + files).
Get
HTTP method annotations for controller methods.
Extracts an HTTP header value into the annotated parameter.
HealthEndpoint
Internal handler for /health and /ready endpoints.
HealthIndicator
Implement to provide a custom health check. Boot auto-discovers all HealthIndicator beans.
HealthResult
Result of a health check.
HttpClient
HTTP client with configured timeouts, headers, and filters. Use HttpClientBuilder to create instances.
HttpClientBuilder
Fluent builder for creating configured HttpClient instances. Injected as a prototype bean — each injection gets a fresh builder pre-loaded with YAML defaults.
HttpClientConfig
Global HTTP client configuration, bound from boot.http.client.*.
HttpClientConfiguration
Configuration for the HTTP client, read from boot.http.client.* in application.yml.
HttpClientFactory
Factory that produces the default HttpClient bean from HttpClientConfig.
HttpClientFilter
Client-side filter interface.
HttpClientServiceConfig
Per-service HTTP client configuration, auto-registered from YAML.
HttpServerFilter
Server-side filter interface.
Inject
Qualifier for constructor parameter injection.
InterceptorBean
Associates an interceptor with an advice annotation.
InterceptorChain
Executes a chain of interceptors, then the original method.
InvocationContext
Context passed to interceptors during method invocation.
Logger
Lightweight logger — create with a name, use anywhere.
LogHandler
Interface for log output. Implement to send logs to custom destinations.
LogManager
Logger factory and registry.
LogRecord
A structured log record.
MethodHook
Meta-annotation that marks an annotation as triggering method-level wiring.
MethodInterceptor
Implement this to create a method interceptor. This interface lives in boot_core because the container stores interceptors.
MethodMetadata
Metadata about an annotated method on a bean.
MethodWiringProcessor
Interface for modules that wire method-level annotations at runtime.
MultipartFile
Represents an uploaded file from a multipart form.
MutableRequest
Mutable HTTP request (for client filters to modify before sending).
MutableResponse
Mutable response (for server filters to modify headers/status after handler).
Named
Qualifier that identifies a bean by name.
OnClose
Method called when the connection is closed.
OnError
Method called when an error occurs.
OnMessage
Method called when a message is received.
OnOpen
Method called when a new WebSocket connection is opened.
Order
Controls the ordering of beans, interceptors, or filters. Lower values have higher priority (execute first). Default is 0.
Patch
PathParam
Extracts a path parameter from the request URL.
Post
PostConstruct
Called after bean construction and dependency injection.
PreDestroy
Called before the container shuts down.
Primary
Marks a bean as the primary candidate when multiple beans of the same type exist.
Produces
Declares the content type(s) produced by a controller method. Default is application/json.
Prototype
Marks a bean as prototype scope — a new instance is created each time it's injected.
Put
Qualifier
Meta-annotation to mark an annotation as a qualifier. Custom qualifier annotations should be annotated with this.
QueryParam
Extracts a query parameter from the request URL.
RefreshTokenGenerator
Generates refresh tokens.
Replaces
Declares that this bean replaces another bean.
Request
Immutable HTTP request.
RequestLoggingFilter
Built-in filter that logs every HTTP request with method, path, status, and duration.
Requires
Conditional bean loading. The bean is only registered if all conditions are met.
Response
HTTP response.
RouteEntry
A single route entry with method, path, and handler.
RouteRegistration
Interface implemented by generated route registration classes.
RouteRegistry
Minimal route registration interface used by library modules. Implemented by BootRouter in boot_http.
RouteSource
Meta-annotation that marks an annotation as producing HTTP routes.
Scheduled
Schedules a method for periodic or delayed execution.
ScheduledTask
A scheduled task entry.
ScheduledWiringProcessor
Wires @Scheduled methods to the TaskScheduler at runtime.
Secured
Marks a controller or method with access rules.
SecurityFilter
Internal security filter — intercepts requests and enforces access rules. Checks both intercept-url-map (YAML) and @Secured annotations (route metadata).
SecurityRule
Constants for @Secured annotation values.
SecurityRuleEntry
A security rule entry from YAML intercept-url-map or @Secured annotations.
Serdeable
Marks a class for both serialization (toJson) and deserialization (fromJson).
Serializable
Marks a class for serialization only (toJson).
ServerFilter
Annotation for server-side HTTP filters. Apply to a class that implements HttpServerFilter.
ServerWebSocket
Marks a class as a WebSocket endpoint handler. Implies @Singleton.
ShutdownEvent
Emitted when the Boot application is shutting down.
Singleton
Marks a class as a singleton-scoped managed bean (one shared instance). This is the default and most common scope.
SseEvent
A Server-Sent Event.
SslConfig
SSL/TLS configuration for the server.
StartupEvent
Emitted when the Boot application has started.
StaticFileHandler
Serves static files from a directory.
Status
Overrides the default response status code for a controller method.
TaskScheduler
Manages scheduled tasks.
TokenGenerator
Generates access tokens.
TokenReader
Extracts a token string from an authentication request.
TokenValidator
Validates a token and returns its claims.
Traceparent
W3C Traceparent header support.
TracePropagationFilter
Client filter that propagates traceparent to outgoing HTTP calls. Registered automatically when boot.tracing.propagation is enabled.
Value
Injects a configuration value. Supports placeholder syntax: ${key:defaultValue}
WebSocketHandlerConfig
Configuration for a WebSocket endpoint handler.
WebSocketServer
WebSocket server — manages endpoints and connections.
WebSocketServerBuilder
Builder for creating configured WebSocketServer instances.
WebSocketSession
Represents a single WebSocket connection.
WebSocketWiringProcessor
Wires @ServerWebSocket beans to the WebSocketServer at runtime.

Enums

ClientAuth
TLS client authentication mode.
Level
Log severity levels.

Extensions

AnnotationMetadataQuery on List<AnnotationValue>
Extension for querying annotation metadata on a BeanDefinition.

Constants

clientFilterAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
eventListenerAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
exceptionHandlerAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
onCloseAnnotationType → const AnnotationType
onErrorAnnotationType → const AnnotationType
onMessageAnnotationType → const AnnotationType
onOpenAnnotationType → const AnnotationType
orderAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
scheduledAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
securedAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
serverFilterAnnotationType → const AnnotationType
AnnotationType constant for runtime metadata queries.
serverWebSocketAnnotationType → const AnnotationType
AnnotationType constants for runtime metadata queries.

Functions

$BootHttpClientModule(BeanContainer container, RouteRegistry router, BootConfig config, List<void Function()> deferred) → void
Module function for the boot_http_client library. Called by the consuming app's $configure() to wire this library's beans.
configureRuntime(BeanContainer container, BootRouter router, BootConfig config) Future<void>
Shared runtime configuration used by both Boot.run and bootTest. Wires all config-driven features (WebSocket, static files, security, etc.) after $configure has registered beans and routes.
parseDuration(String input) Duration
Parse a duration string into a Duration.
parseDurationOrNull(String? input) Duration?
Parse a duration string, returning null only if input is null or empty.
parseMultipart(List<int> body, String boundary) FormData
Parses multipart/form-data from raw bytes and boundary.

Typedefs

BootContextRegistrar = void Function(BeanContainer container, BootRouter router)
Function type for the generated context registration.
ErrorHandler = Response Function(Object error, StackTrace stack)
Error handler function type.
RouteHandler = Future<Response> Function(Request request)
Handler function type for routes.
WebSocketHandler = void Function(WebSocketSession session)
Handler type for WebSocket connections.

Exceptions / Errors

BadRequestException
BeanNotFoundException
Thrown when a requested bean type is not registered.
CircularDependencyException
Thrown when a circular dependency is detected at runtime.
ConflictException
ForbiddenException
HttpClient4xxException
Remote returned a 4xx response.
HttpClient5xxException
Remote returned a 5xx response.
HttpClientException
Base exception for HTTP client errors (connection failures, timeouts, non-2xx responses).
HttpException
Base class for HTTP exceptions with a status code.
InternalServerException
NonUniqueBeanException
Thrown when multiple beans match an injection point with no qualifier or @Primary.
NotFoundException
RateLimitException
ServiceUnavailableException
UnauthorizedException
UnprocessableException