avatar property
The avatar is an optional ImageProvider property representing the author's avatar image in a 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',
avatar: NetworkImage('https://example.com/user-avatar.jpg')
),
),
],
);
}
Implementation
@override
final ImageProvider? avatar;