SfChat constructor

const SfChat({
  1. Key? key,
  2. required List<ChatMessage> messages,
  3. required String outgoingUser,
  4. ChatComposer? composer = const ChatComposer(),
  5. ChatActionButton? actionButton,
  6. WidgetBuilder? placeholderBuilder,
  7. ChatWidgetBuilder? bubbleHeaderBuilder,
  8. ChatWidgetBuilder? bubbleAvatarBuilder,
  9. ChatWidgetBuilder? bubbleContentBuilder,
  10. ChatWidgetBuilder? bubbleFooterBuilder,
  11. ChatBubbleSettings incomingBubbleSettings = const ChatBubbleSettings(),
  12. ChatBubbleSettings outgoingBubbleSettings = const ChatBubbleSettings(),
})

Creates an SfChat widget that displays the content of either incoming or outgoing messages based on the current user.

Each message includes details such as the message text, timestamp, and author information.

Implementation

const SfChat({
  super.key,
  required this.messages,
  required this.outgoingUser,
  this.composer = const ChatComposer(),
  this.actionButton,
  this.placeholderBuilder,
  this.bubbleHeaderBuilder,
  this.bubbleAvatarBuilder,
  this.bubbleContentBuilder,
  this.bubbleFooterBuilder,
  this.incomingBubbleSettings = const ChatBubbleSettings(),
  this.outgoingBubbleSettings = const ChatBubbleSettings(),
});