TextContent class final
Plain text produced by the model.
Ported from pi's TextContent.
- Inheritance
-
- Object
- ContentBlock
- TextContent
Constructors
- TextContent({required String text, String? textSignature})
-
const
-
TextContent.fromJson(Map<
String, dynamic> json) -
Deserializes from a JSON map produced by toJson.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
The text itself.
final
- textSignature → String?
-
Provider-specific opaque signature (e.g. an OpenAI responses message id)
needed to replay this block in multi-turn conversations.
final
Methods
-
copyWith(
{String? text, String? textSignature}) → TextContent -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes to a JSON map with a
typediscriminator (pi shape).override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited