AgentAnswer constructor

const AgentAnswer({
  1. Key? key,
  2. required Widget child,
  3. AgentAnswerStatus status = AgentAnswerStatus.complete,
  4. Object? id,
  5. Widget? sources,
  6. bool? showActions,
  7. VoidCallback? onCopy,
  8. AgentAnswerFeedback? feedback,
  9. ValueChanged<AgentAnswerFeedback?>? onFeedback,
  10. VoidCallback? onRetry,
  11. String copyLabel = 'Copy',
  12. String copiedLabel = 'Copied',
  13. String positiveLabel = 'Good response',
  14. String negativeLabel = 'Bad response',
  15. String retryLabel = 'Retry',
  16. Duration copiedDuration = const Duration(seconds: 2),
  17. String semanticLabel = 'Answer',
  18. AgentGlyphBuilder? glyphBuilder,
  19. IconButtonStyler actionStyle = const IconButtonStyler.create(),
  20. IconButtonStyler selectedActionStyle = const IconButtonStyler.create(),
  21. AgentAnswerStyler style = const AgentAnswerStyler.create(),
  22. AgentAnswerSpec? styleSpec,
})

Creates an answer with the body child.

Implementation

const AgentAnswer({
  super.key,
  required this.child,
  this.status = AgentAnswerStatus.complete,
  this.id,
  this.sources,
  this.showActions,
  this.onCopy,
  this.feedback,
  this.onFeedback,
  this.onRetry,
  this.copyLabel = 'Copy',
  this.copiedLabel = 'Copied',
  this.positiveLabel = 'Good response',
  this.negativeLabel = 'Bad response',
  this.retryLabel = 'Retry',
  this.copiedDuration = const Duration(seconds: 2),
  this.semanticLabel = 'Answer',
  this.glyphBuilder,
  this.actionStyle = const IconButtonStyler.create(),
  this.selectedActionStyle = const IconButtonStyler.create(),
  this.style = const AgentAnswerStyler.create(),
  this.styleSpec,
});