hostSlotBuilder property

HostSlotBuilder? hostSlotBuilder
final

Builder the host registers to render host_slot rich-content components with its own native widget. The bot reserves a spot (slot_id) and the SDK calls this with (slotId, payload); return the widget to inline in the bubble (or null for unrecognised slot ids → renders nothing).

Use it for app-owned inline UI the chat server can't draw — e.g. an in-chat PDF preview of a generated document, or a design picker with real template thumbnails. Must render purely from payload: chat history reloads re-parse the message JSON, so nothing may be keyed on local state.

Implementation

final HostSlotBuilder? hostSlotBuilder;