AgentMessage constructor

const AgentMessage({
  1. Key? key,
  2. required AgentRole role,
  3. required Widget child,
  4. Widget? header,
  5. Widget? footer,
  6. String? semanticLabel,
  7. bool? expanded,
  8. bool defaultExpanded = false,
  9. ValueChanged<bool>? onExpandedChanged,
  10. String showMoreLabel = 'Show more',
  11. String showLessLabel = 'Show less',
  12. ButtonStyler toggleStyle = const ButtonStyler.create(),
  13. AgentMessageStyler style = const AgentMessageStyler.create(),
  14. 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,
});