ContentBlock class sealed

A content block inside an assistant or user message.

Mirrors the Anthropic Beta content-block union. Raw-preserving like SdkMessage: toJson reproduces the original JSON.

Implementers

Constructors

ContentBlock.fromJson(Map<String, dynamic> json)
Parses json into the matching ContentBlock subclass.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
raw → Map<String, dynamic>
The full original wire JSON for this block.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The block type discriminator.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Reproduces the original wire JSON verbatim.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited