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,
- ChatSuggestionItemSelectedCallback? onSuggestionItemSelected,
- 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, author information, list of suggestions and suggestion settings.
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.onSuggestionItemSelected,
this.incomingBubbleSettings = const ChatBubbleSettings(),
this.outgoingBubbleSettings = const ChatBubbleSettings(),
});