RichContentResponse constructor

const RichContentResponse({
  1. required List<RichComponent> components,
  2. @JsonKey.new(name: 'fallback_text') String? fallbackText,
  3. List<RichAction>? actions,
})

Implementation

const factory RichContentResponse({
  /// List of components to render
  required List<RichComponent> components,

  /// Fallback text for accessibility or error states
  @JsonKey(name: 'fallback_text') String? fallbackText,

  /// Silent, non-interactive actions the SDK auto-dispatches on render
  /// — no button is drawn. Used for things like [ChangeLanguageAction]
  /// where the backend's tool call should switch the chat language
  /// without any user tap. Interactive actions still live inside their
  /// components (card / image / button_group).
  List<RichAction>? actions,
}) = _RichContentResponse;