AgentAnswer constructor
const
AgentAnswer({
- Key? key,
- required Widget child,
- AgentAnswerStatus status = AgentAnswerStatus.complete,
- Object? id,
- Widget? sources,
- bool? showActions,
- VoidCallback? onCopy,
- AgentAnswerFeedback? feedback,
- ValueChanged<
AgentAnswerFeedback?> ? onFeedback, - VoidCallback? onRetry,
- String copyLabel = 'Copy',
- String copiedLabel = 'Copied',
- String positiveLabel = 'Good response',
- String negativeLabel = 'Bad response',
- String retryLabel = 'Retry',
- Duration copiedDuration = const Duration(seconds: 2),
- String semanticLabel = 'Answer',
- AgentGlyphBuilder? glyphBuilder,
- IconButtonStyler actionStyle = const IconButtonStyler.create(),
- IconButtonStyler selectedActionStyle = const IconButtonStyler.create(),
- AgentAnswerStyler style = const AgentAnswerStyler.create(),
- 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,
});