AgentComposer constructor

const AgentComposer({
  1. Key? key,
  2. AgentComposerController? controller,
  3. FocusNode? focusNode,
  4. ValueChanged<String>? onSubmit,
  5. VoidCallback? onStop,
  6. bool enabled = true,
  7. bool autofocus = false,
  8. String hintText = 'Message',
  9. String semanticLabel = 'Message',
  10. Widget? leading,
  11. Widget? trailing,
  12. String submitLabel = 'Send',
  13. String stopLabel = 'Stop',
  14. AgentGlyphBuilder? glyphBuilder,
  15. TextFieldStyler fieldStyle = const TextFieldStyler.create(),
  16. IconButtonStyler submitStyle = const IconButtonStyler.create(),
  17. IconButtonStyler stopStyle = const IconButtonStyler.create(),
  18. AgentComposerStyler style = const AgentComposerStyler.create(),
  19. AgentComposerSpec? styleSpec,
})

Creates a composer.

Implementation

const AgentComposer({
  super.key,
  this.controller,
  this.focusNode,
  this.onSubmit,
  this.onStop,
  this.enabled = true,
  this.autofocus = false,
  this.hintText = 'Message',
  this.semanticLabel = 'Message',
  this.leading,
  this.trailing,
  this.submitLabel = 'Send',
  this.stopLabel = 'Stop',
  this.glyphBuilder,
  this.fieldStyle = const TextFieldStyler.create(),
  this.submitStyle = const IconButtonStyler.create(),
  this.stopStyle = const IconButtonStyler.create(),
  this.style = const AgentComposerStyler.create(),
  this.styleSpec,
});