AIChatMessageContentBlock class sealed
An ordered content block produced by a chat model.
A block can be correlated across streaming chunks through either a stable provider id or an explicit provider index. Provider-specific values must be nested under a provider namespace in providerData.
Constructors
-
AIChatMessageContentBlock.fromMap(Map<
String, dynamic> map) -
Converts a map to a content block.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Stable provider identifier for this block, when available.
final
- index → int?
-
Position assigned to this block by the provider's streaming protocol.
final
- isMergeable → bool
-
Whether later streaming chunks may be merged into this block.
final
-
providerData
→ Map<
String, dynamic> -
Provider-specific data, nested under a provider namespace.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- streamIdentity → String?
-
A stable identity that can be used to merge streamed chunks.
no setter
Methods
-
canMerge(
AIChatMessageContentBlock other) → bool -
Whether
otheris a chunk of the same logical streaming block. -
concat(
AIChatMessageContentBlock other) → AIChatMessageContentBlock - Merges a later streaming chunk into this block.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts this block to a map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited