DynamicMessageRequest class final

The widget definition the agent asked the host to present.

Constructors

DynamicMessageRequest({required String title, required String jsSource, Map<String, Object?>? initialState, double? heightHint})
Creates a request. title is a non-empty display name; jsSource is the widget JavaScript (at most dynamicMessageMaxSourceBytes UTF-8 bytes, enforced by the tool); heightHint is a preferred height in logical pixels (> 0).
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
heightHint → double?
Preferred widget height in logical pixels, or null for the default.
final
initialState → Map<String, Object?>?
Initial state object handed to the widget on boot, or null.
final
jsSource → String
The widget JavaScript source (same bridge surface as installed apps).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
The widget title shown in the chat tile and in [widget <title>] event message prefixes.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes the request for persistence (the host's dynamic_widget records) and replay.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, Object?> json) → DynamicMessageRequest
Rebuilds a request from toJson output (tests/replay reuse).