flutter_mcp_ui_runtime library

Classes

AccessibleFormField
Form field with live validation announcements
AccessibleProgressIndicator
Progress indicator with live region announcements
ActionHandler
Handles action execution
AppDensity
VisualDensity and scrollbar hover policy for the active FormFactor.
AppIconSizes
Icon-size scale. Logical pixels.
AppIconSizesScale
FormFactor-resolved icon sizes. Returned from AppIconSizes.of.
ApplicationDefinition
Application definition according to spec
AppSpacing
Spacing / padding / gap scale (8-point grid). Logical pixels.
AppSpacingScale
Design-token sets resolved against the active FormFactor.
AppTypography
AppTypographyScale
TextTheme resolved against the active FormFactor.
AsyncValidator
Async validator base class
BackgroundServiceDefinition
Background service definition
BackgroundServiceManager
Manages background services for the runtime
BackgroundServiceRunner
Runs a single background service
BackpressureController
Controls backpressure for channel streams (CH-07)
BaseService
Base implementation of Service
BatchResourceLoader
Loads multiple client resources in a single operation.
BatchResourceResult
Result of a batch resource load operation
BatchResourceSource
A single source entry in a batch resource declaration
Binding
Binding definition
BindingEngine
Engine for handling data bindings
BundleAssetProvider
Resolves bundle:// URIs to consumable asset references.
BundlePageAdapter
Internal helper that converts UiSection pages into route mappings and page content for ApplicationDefinition consumption.
BundleUiReadAdapter
Read adapter that implements UiPort from mcp_bundle.
CachedApp
Represents a cached app
CacheManager
Cache manager for MCP UI Runtime
CachePolicy
Cache policy configuration
CacheStats
Cache statistics
Channel
Base class for channels
ChannelActionExecutor
Executes v1.1 channel actions (start, stop, toggle)
ChannelConfig
v1.1: Channel configuration for bidirectional communication
ChannelManager
Manages channel lifecycle and data flow
ChannelMessage
Structured channel message with protocol metadata
ChannelRateLimiter
Sliding window rate limiter
ChannelTypes
Channel types for bidirectional communication
ClientActionHandler
Handles client-side action execution
ClientActionTypes
Client action type constants
ClientPermissions
Permission types for client actions Uses dot-namespaced format per spec standard
ClientResourceResolver
Resolves client:// resource URIs
ClientResourceSchemes
Client resource URI schemes
ClientResourceUri
Parsed client resource URI
ComponentLifecycleHandler
Handles lifecycle events for individual components
CompositeAsyncValidator
Composite async validator that combines multiple validators
ComputedProperty
Represents a computed property that derives its value from other state according to MCP UI DSL v1.0 specification.
ConformanceChecker
Checker for determining conformance level support.
CustomResourceProvider
A registered custom resource provider
CustomResourceProviderRegistry
Registry for custom client:// resource providers.
CustomValidator
Custom validator that uses expressions for validation according to MCP UI DSL v1.0 specification
Debouncer
Debouncer utility for performance optimization according to MCP UI DSL v1.0 specification
DependencyResolveResult
Result of resolving all resources in a dependency graph
DialogAction
Represents an action in a dialog
DialogService
Service for managing dialogs, bottom sheets, and overlays
DslAppMetadata
Top-level application metadata — spec §11.1.
ErrorBoundary
Error boundary widget for catching and handling errors according to MCP UI DSL v1.0 specification
ErrorRecovery
Error recovery widget with multiple strategies
ExamplePlugin
Example plugin implementation
ExampleWidgetFactory
Example widget factory for the plugin
ExpressionSandbox
Configuration for expression evaluation sandboxing.
FilePermissionConfig
File permission configuration
FlowControlConfig
Flow control configuration combining inbound and outbound rate limits
FocusGroup
Focus group for managing related focus nodes
FocusRestore
Focus restore widget for preserving focus state
FormFactorScope
InheritedWidget that pins a FormFactor for a subtree.
GlobalErrorHandler
Global error handler registration
HttpPermissionConfig
HTTP permission configuration
I18nLoader
Loader for i18n translations
I18nManager
Manager for internationalization support according to MCP UI DSL v1.0
JsonPath
Utility for accessing nested data using path notation
LifecycleDefinition
Lifecycle definition
LifecycleManager
Manages component and runtime lifecycle events
LiveRegion
Live region widget for dynamic content announcements
LiveRegionBuilder
Live region builder for dynamic content
LiveRegionManager
Live region manager for accessibility announcements
MCPFocusManager
Focus manager for accessibility improvements according to MCP UI DSL v1.0 specification
MCPFocusTraversalPolicy
Focus traversal policy for custom navigation
MCPLogger
Logger for MCP UI Runtime that outputs debug messages.
MCPNotification
Represents a notification in the MCP UI Runtime
MCPPageScopeWrapper
Widget that provides page state scope wrapper
MCPPageWidget
Widget that renders a single page
MCPPlugin
Base class for MCP plugins according to MCP UI DSL v1.0
MCPUIRuntime
Main MCP UI Runtime class that provides the entry point for using the runtime
MCPUIRuntimeHelper
Convenience functions for quick runtime usage
MessageOrderer
Ensures message ordering for channel streams (CH-08)
Executes navigation actions
Navigation definition
Navigation item
Navigation service for managing app navigation
NotificationAction
Represents an action that can be performed on a notification
NotificationChannel
Represents a notification channel for organizing notifications
NotificationManager
Manages local and system notifications for the MCP UI Runtime
NotificationService
Service for managing notifications within the runtime
PageDefinition
Page definition according to spec
PageStateNotifier
Notifier for page state changes
PageStateScope
Provides a page-specific state scope for multi-page applications
PathSegment
Represents a segment in a path (e.g., "items" or "0")
PermissionCheckResult
Result of a permission check with prompt
PermissionManager
Manages permissions for client actions
PermissionsConfig
v1.1: Permission configuration for client actions
PluginContext
Plugin context provided to plugins during initialization
PluginInfo
Plugin information
PluginManager
Plugin manager for loading and managing plugins
PublisherInfo
Publisher identity information.
RateLimitConfig
Configuration for a single direction (inbound or outbound) rate limit
RateLimiter
Rate limiter utility for controlling action frequency
RemoteValidator
Remote validator for server-side validation
RenderContext
Render context that provides access to runtime services during widget rendering
Renderer
Core rendering engine for MCP UI DSL
ResolverCachedEntry
A simple cached resource entry for the resolver's internal cache. For the richer lifecycle-aware version, see CachedResource in core/client_resource_manager.dart.
ResourceCacheManager
Caching strategies for client resources
ResourceContentType
Content type information derived from a file extension or explicit encoding
ResourceDeclaration
Declaration of a single resource with optional dependency info
ResourceDependencyResolver
Resolves a set of resource declarations respecting dependency order.
ResourceEntry
Tracks a resource through its lifecycle
ResourceResult
Result of a resource resolution
ResourceSizeLimits
Size limit constants matching spec §Binary Resource Handling table
ResourceTransformer
Resource transformation pipeline
RouteInfo
Route information
RouteManager
Manages application routing based on MCP UI DSL spec
RuntimeEngine
The main runtime engine that manages the MCP UI Runtime lifecycle and coordinates all runtime services.
RuntimeService
Abstract base class for all runtime services
Service
Service interface for common service operations
ServiceLocator
Service locator for dependency injection according to MCP UI DSL v1.0 specification
ServiceProvider
Service provider widget for Flutter
ServiceRegistry
Registry for managing runtime services
ServicesDefinition
Services definition
ShellPermissionConfig
Shell execution permission configuration
SkipToContent
Skip to content widget for accessibility
SplashConfig
Splash screen configuration.
StateManager
Manages application state with change notifications Supports computed properties according to MCP UI DSL v1.0
StateWatcher
Watches for changes to a specific state path
StateWatcherGroup
A group of watchers that can be managed together
StatusLiveRegion
Status live region for form validation and status updates
ThemeManager
Theme manager for MCP UI DSL 1.3 — specs/mcp_ui_dsl/05_Theme.md.
Throttler
Throttler utility for performance optimization
TimestampInfo
Creation / update timestamps — spec §11.3.
TouchTargetSize
Minimum touch target sizes per WCAG 2.5.8
TrustLevelManager
Manages the current trust level and validates permission requirements
UIDefinition
Main UI definition that can be either an application or a page
UpdatePolicy
Update policy for checking app updates
ValidationEngine
Validation engine for MCP UI DSL v1.0
ValidationRule
Validation rule
ValidationState
Validation state for managing async validation
Validator
Base validator class
ViewModeResolver
Resolves the effective FormFactor by walking the priority chain defined in the responsive-rendering plan §4:
VirtualizedGridWidget
Virtualized grid widget for performance optimization
VirtualizedListWidget
Virtualized list widget for performance optimization according to MCP UI DSL v1.0 specification
WidgetFactory
Base class for widget factories
WidgetRegistry
Registry for widget factories

Enums

BackpressureStrategy
Backpressure strategy for channel data flow control (CH-07)
BindingSource
Binding source types
CacheStrategy
Cache strategy for deciding between cache and network
ChannelMessageDirection
Direction of a channel message
ChannelMessageType
Type of channel message
ChannelState
Channel lifecycle state enum (CH-05)
ConformanceLevel
Conformance level definitions for MCP UI DSL v1.0
DialogType
Types of dialogs
ErrorRecoveryStrategy
Error recovery strategies
EvictionPolicy
Eviction policy for removing cache entries
FormFactor
Device form factor class per Material 3 window-size taxonomy.
LifecycleEvent
Enumeration of lifecycle events supported by the runtime
LiveRegionType
Live region types for accessibility announcements according to MCP UI DSL v1.0 specification
NotificationEvent
Events that can occur with notifications
NotificationImportance
Importance levels for notifications
NotificationType
Types of notifications supported by the runtime
OfflineMode
Offline mode options
ServiceStatus
Service status
SnackbarType
Types of snackbars
TrustLevel
Represents the trust level granted to a UI context
UIDefinitionType
Core models for MCP UI DSL.
ValidationRuleType
Validation rule types
ViewMode
User-selected view-mode pin.

Mixins

DebounceMixin
Mixin to add debouncing capabilities to widgets
FormValidationMixin<T extends StatefulWidget>
Form validation mixin for widgets
ServiceLocatorMixin<T extends StatefulWidget>
Mixin to add service locator access to widgets
ThrottleMixin
Mixin to add throttling capabilities to widgets

Extensions

NotificationActionJson on NotificationAction
Extension methods for NotificationAction
VirtualizationExtension on RenderContext
Extension to integrate virtualized lists with existing list widgets

Typedefs

CustomResourceHandler = Future<ResourceResult> Function(String path, Map<String, dynamic>? config)
Handler function signature for custom resource providers.
NotificationListener = void Function(NotificationEvent event, MCPNotification notification, String? actionId)
Callback type for notification events
RenderInspector = Widget Function(Widget child, Map<String, dynamic> node)
Wrap callback supplied by host tooling (e.g. the AppPlayer Builder / vibe editor) so each rendered widget can be paired with its source JSON node for hit-testing. The runtime invokes the wrapper exactly once per renderWidget call. When no wrapper is supplied the runtime follows the fast path with zero per-node overhead.
StateChangeCallback = Future<void> Function(dynamic newValue, dynamic oldValue)
Represents a function that is called when a watched state value changes

Exceptions / Errors

CircularDependencyException
Exception thrown when circular dependency is detected
PluginException
Plugin exception
ResourceCircularDependencyException
Exception thrown when a circular dependency is detected at parse time
ServiceException
Exception thrown when service operations fail
ServiceNotFoundException
Exception thrown when a service is not found