SfChat constructor
const
SfChat({
- Key? key,
- required List<
ChatMessage> messages, - required String outgoingUser,
- ChatComposer? composer = const ChatComposer(),
- ChatActionButton? actionButton,
- WidgetBuilder? placeholderBuilder,
- ChatWidgetBuilder? bubbleHeaderBuilder,
- ChatWidgetBuilder? bubbleAvatarBuilder,
- ChatWidgetBuilder? bubbleContentBuilder,
- ChatBubbleSettings incomingBubbleSettings = const ChatBubbleSettings(),
- 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(),
});