MessageResponse class
Represents a response containing the detailed message history of a specific conversation.
Use this model to rebuild the chat interface when a user reopens a previously saved conversation thread.
Constructors
-
MessageResponse({required int count, required List<
RichMessage> history, required Map<String, dynamic> metaData}) -
MessageResponse.fromJson(Map<
String, dynamic> json) -
Creates a MessageResponse from a JSON map.
factory
Properties
- count → int
-
The total number of messages in the conversation history.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
history
→ List<
RichMessage> -
A list of RichMessage objects representing individual chat turns.
final
-
metaData
→ Map<
String, dynamic> -
Supplementary diagnostic data or pagination information.
Maps to
meta_datain the JSON payload.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
-
toJson(
) → Map< String, dynamic> - Converts the MessageResponse instance into a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited