author property
Author of the message.
The AssistMessageAuthor contains a unique id, name of the author, and an optional avatar image field.
Also, it has a AssistMessageAuthor.empty constructor, which is used when there is no information about the author of the assist message.
Example:
@override
Widget build(BuildContext context) {
return SfAIAssistView(
messages: <AssistMessage>[
AssistMessage.response(
data: 'Hello, how can I help you today?',
author: const AssistMessageAuthor(
id: '123-001',
name: 'AI Assistant',
),
),
],
);
}
Implementation
@override
final AssistMessageAuthor? author;