MessageFinished class final
- Inheritance
-
- Object
- AiStreamEvent
- MessageFinished
Constructors
- MessageFinished({required String messageId, required FinishReason reason, AiUsage? usage})
-
Creates a message-finished event.
const
-
MessageFinished.fromJson(Map<
String, Object?> json) -
Reconstructs a MessageFinished from
json.factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- messageId → String
-
The message that finished.
final
- reason → FinishReason
-
Why generation stopped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → AiUsage?
-
Token usage for the turn, if the provider reported it.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes this event, including its
typediscriminator.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override