RuntimeEngine class

The main runtime engine that manages the MCP UI Runtime lifecycle and coordinates all runtime services.

Mixed-in types

Constructors

RuntimeEngine.new({bool enableDebugMode = kDebugMode})

Properties

actionHandler ActionHandler
no setter
applicationDefinition ApplicationDefinition?
no setter
bindingEngine → BindingEngine
no setter
cache → CacheManager
no setter
cacheManager → CacheManager
no setter
enableDebugMode bool
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isApplication bool
no setter
isInitialized bool
no setter
isReady bool
no setter
lifecycle LifecycleManager
no setter
notifications NotificationManager
no setter
onResourceSubscribe → dynamic Function(String, String)?
no setter
onResourceUnsubscribe → dynamic Function(String)?
no setter
parsedUIDefinition UIDefinition?
no setter
renderer Renderer
no setter
routeManager RouteManager?
no setter
runtimeConfig Map<String, dynamic>?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services ServiceRegistry
no setter
stateManager StateManager
no setter
themeManager → ThemeManager
no setter
uiDefinition Map<String, dynamic>?
no setter
widgetRegistry WidgetRegistry
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
destroy() Future<void>
Destroys the runtime and cleans up resources
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
getBindingForUri(String uri) String?
handleMCPNotification(Map<String, dynamic> params, {dynamic resourceReader(String)?}) Future<void>
Handles MCP notification with automatic mode detection Supports both standard (URI only) and extended (URI + content) modes
handleNotification(String uri, Map<String, dynamic> data) → void
Handles MCP notification for resource updates
handleResourceNotification(String uri, Map<String, dynamic> data) → void
initialize({required Map<String, dynamic> definition, RenderContext? context, bool useCache = true, dynamic pageLoader(String)?}) Future<void>
Initializes the runtime engine with the provided configuration
markReady() Future<void>
Marks the runtime as ready and executes onReady lifecycle hooks
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pause() Future<void>
Handles application pause events
registerResourceSubscription(String uri, String binding) → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resume() Future<void>
Handles application resume events
setResourceHandlers({dynamic onResourceSubscribe(String, String)?, dynamic onResourceUnsubscribe(String)?}) → void
toString() String
A string representation of this object.
inherited
unregisterResourceSubscription(String uri) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited