RuntimeEngine class
The main runtime engine that manages the MCP UI Runtime lifecycle and coordinates all runtime services.
- Mixed-in types
Constructors
- RuntimeEngine({bool enableDebugMode = kDebugMode, RenderInspector? widgetWrapper})
Properties
- actionHandler → ActionHandler
-
no setter
- animationService → AnimationService
-
no setter
- applicationDefinition → ApplicationDefinition?
-
no setter
-
appMetadata
→ ValueListenable<
DslAppMetadata?> -
Observable snapshot of the current application metadata
(spec §11).
valueis null beforeinitializecompletes and whenever the runtime holds a non-application (page-only) DSL. Listeners fire whenever the cache is replaced — for example whenui://app/infoemits a resource-update notification.no setter - backgroundServiceManager → BackgroundServiceManager
-
no setter
- bindingEngine → BindingEngine
-
no setter
- cache → CacheManager
-
no setter
- cacheManager → CacheManager
-
no setter
- channelManager → ChannelManager
-
no setter
- computedManager → ComputedManager
-
no setter
- connectivityManager → ConnectivityManager
-
no setter
- enableDebugMode → bool
-
final
- eventBus → EventBus
-
no setter
- 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
-
Public getter for NavigationService
no setter
- notifications → NotificationManager
-
no setter
- offlineQueue → OfflineQueue
-
no setter
- onResourceList → dynamic Function(String, String)?
-
Optional one-shot
listcallback (spec §4.5). Null when the host did not register one; callers fall back toonResourceSubscribe.no setter - onResourceRead → dynamic Function(String, String)?
-
Optional one-shot
readcallback (spec §4.5). Null when the host did not register one; callers fall back toonResourceSubscribe.no setter - onResourceSubscribe → dynamic Function(String, String)?
-
no setter
- onResourceUnsubscribe → dynamic Function(String)?
-
no setter
- parsedUIDefinition → UIDefinition?
-
no setter
- permissionHandler ↔ Function?
-
Permission handler for custom permission prompts
getter/setter pair
- permissionManager → PermissionManager?
-
Permission manager for runtime permission checks
no setter
- pluginManager → PluginManager
-
no setter
- renderer → Renderer
-
no setter
- responsiveResolver → ResponsiveResolver
-
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
- syncManager → SyncManager
-
no setter
- templateRegistry → TemplateRegistry
-
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.
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
-
loadPage(
String route) → Future< void> - Loads a page by route using the registered page loader.
-
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)?, dynamic onResourceRead(String, String)?, dynamic onResourceList(String, String)?}) → void -
toString(
) → String -
A string representation of this object.
inherited
-
unregisterResourceSubscription(
String uri) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited