UserMessageItem class

A user message item.

Inheritance
Annotations
  • @immutable

Constructors

UserMessageItem({String? id, required UserMessageContent content, ItemStatus? status})
Creates a UserMessageItem.
const
UserMessageItem.fromJson(Map<String, dynamic> json)
Creates a UserMessageItem from JSON.
factory

Properties

content UserMessageContent
The content of the message.
final
hashCode int
The hash code for this object.
no setteroverride
id String?
Unique identifier.
final
role MessageRole
The role of the message.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ItemStatus?
Item status (for output items).
final

Methods

copyWith({Object? id = unsetCopyWithValue, UserMessageContent? content, Object? status = unsetCopyWithValue}) UserMessageItem
Creates a copy with replaced values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override