AgentMessage constructor
const
AgentMessage({
- Key? key,
- required AgentRole role,
- required Widget child,
- Widget? header,
- String? semanticLabel,
- bool? expanded,
- bool defaultExpanded = false,
- ValueChanged<
bool> ? onExpandedChanged, - String showMoreLabel = 'Show more',
- String showLessLabel = 'Show less',
- ButtonStyler toggleStyle = const ButtonStyler.create(),
- AgentMessageStyler style = const AgentMessageStyler.create(),
- AgentMessageSpec? styleSpec,
Creates a message from role holding child.
Implementation
const AgentMessage({
super.key,
required this.role,
required this.child,
this.header,
this.footer,
this.semanticLabel,
this.expanded,
this.defaultExpanded = false,
this.onExpandedChanged,
this.showMoreLabel = 'Show more',
this.showLessLabel = 'Show less',
this.toggleStyle = const ButtonStyler.create(),
this.style = const AgentMessageStyler.create(),
this.styleSpec,
});