StreamPartFinish class final
Final chunk — carries usage, finish reason, and metadata.
- Inheritance
-
- Object
- StreamPart
- StreamPartFinish
Constructors
-
StreamPartFinish({required FinishReason finishReason, required Usage usage, Map<
String, dynamic> ? providerMetadata}) -
StreamPartFinish.fromJson(Map<
String, dynamic> json) -
factory
Properties
- finishReason → FinishReason
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
providerMetadata
→ Map<
String, dynamic> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The variant tag — the single top-level key on the wire (e.g.
'TextDelta','ToolCall','ToolResult','File','Finish','Error'). Empty only for a malformed part.no setterinherited - usage → Usage
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Re-encode to the externally-tagged wire shape (
{tag: payload}).override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited