AssistMessageAuthor class

Represents a author of the assist message.

The AssistMessageAuthor contains a details about the author, such as their unique id, name, and optional avatar image.

Also it has a method constructor named AssistMessageAuthor.empty which can be used when no author information is available.

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',
       ),
     ),
   ],
 );
}

Constructors

AssistMessageAuthor({String? id, required String name, ImageProvider<Object>? avatar})
Creates a new AssistMessageAuthor with the specified id, name, and optional avatar.
const
AssistMessageAuthor.empty()
const

Properties

avatar → ImageProvider<Object>?
The avatar is an optional ImageProvider property representing the author's avatar image in a message .
final
hashCode → int
The hash code for this object.
no setterinherited
id → String?
Unique identifier of the author, it can be used for customize the message appearance and behavior.
final
name → String
The name of the author who sent the message.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited